File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 11import { applySdkMetadata , setTag } from '@sentry/core' ;
22import { init as reactInit } from '@sentry/react' ;
3+ import { logger } from '@sentry/utils' ;
4+ import { DEBUG_BUILD } from './utils/debug-build' ;
35import type { RemixOptions } from './utils/remixOptions' ;
46export { captureRemixErrorBoundaryError } from './client/errors' ;
57export { withSentry } from './client/performance' ;
68
79export { browserTracingIntegration } from './client/browserTracingIntegration' ;
810
11+ // This is a no-op function that does nothing. It's here to make sure that the
12+ // function signature is the same as in the server SDK.
13+ // See issue: https://github.com/getsentry/sentry-javascript/issues/9594
14+ /* eslint-disable @typescript-eslint/no-unused-vars */
15+ export async function captureRemixServerException (
16+ err : unknown ,
17+ name : string ,
18+ request : Request ,
19+ isRemixV2 : boolean ,
20+ ) : Promise < void > {
21+ DEBUG_BUILD &&
22+ logger . warn (
23+ '`captureRemixServerException` is a server-only function and should not be called in the browser. ' +
24+ 'This function is a no-op in the browser environment.' ,
25+ ) ;
26+ }
27+ /* eslint-enable @typescript-eslint/no-unused-vars */
28+
929export * from '@sentry/react' ;
1030
1131export function init ( options : RemixOptions ) : void {
Original file line number Diff line number Diff line change @@ -18,6 +18,13 @@ export declare const contextLinesIntegration: typeof clientSdk.contextLinesInteg
1818export declare const getDefaultIntegrations : ( options : Options ) => Integration [ ] ;
1919export declare const defaultStackParser : StackParser ;
2020
21+ export declare function captureRemixServerException (
22+ err : unknown ,
23+ name : string ,
24+ request : Request ,
25+ isRemixV2 : boolean ,
26+ ) : Promise < void > ;
27+
2128// This variable is not a runtime variable but just a type to tell typescript that the methods below can either come
2229// from the client SDK or from the server SDK. TypeScript is smart enough to understand that these resolve to the same
2330// methods from `@sentry/core`.
You can’t perform that action at this time.
0 commit comments