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 1
1
import { applySdkMetadata , setTag } from '@sentry/core' ;
2
2
import { init as reactInit } from '@sentry/react' ;
3
+ import { logger } from '@sentry/utils' ;
4
+ import { DEBUG_BUILD } from './utils/debug-build' ;
3
5
import type { RemixOptions } from './utils/remixOptions' ;
4
6
export { captureRemixErrorBoundaryError } from './client/errors' ;
5
7
export { withSentry } from './client/performance' ;
6
8
7
9
export { browserTracingIntegration } from './client/browserTracingIntegration' ;
8
10
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
+
9
29
export * from '@sentry/react' ;
10
30
11
31
export 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
18
18
export declare const getDefaultIntegrations : ( options : Options ) => Integration [ ] ;
19
19
export declare const defaultStackParser : StackParser ;
20
20
21
+ export declare function captureRemixServerException (
22
+ err : unknown ,
23
+ name : string ,
24
+ request : Request ,
25
+ isRemixV2 : boolean ,
26
+ ) : Promise < void > ;
27
+
21
28
// This variable is not a runtime variable but just a type to tell typescript that the methods below can either come
22
29
// from the client SDK or from the server SDK. TypeScript is smart enough to understand that these resolve to the same
23
30
// methods from `@sentry/core`.
You can’t perform that action at this time.
0 commit comments