File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -586,9 +586,13 @@ export abstract class BaseClient<O extends ClientOptions> implements Client<O> {
586586 if ( __DEBUG_BUILD__ ) {
587587 // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for
588588 // control flow, log just the message (no stack) as a log-level log.
589- const logLevel = ( reason as SentryError ) . logLevel || 'warn' ;
590- const logee = logLevel === 'log' ? ( reason as SentryError ) . message : reason ;
591- logger [ logLevel as 'log' | 'warn' ] ( logee ) ;
589+ if ( reason instanceof SentryError ) {
590+ // `SentryError`s are tagged as 'warn' by default, but can be marked as 'log' if they don't actually indicate
591+ // a problem
592+ logger [ reason . logLevel as 'log' | 'warn' ] ( reason . message ) ;
593+ } else {
594+ logger . warn ( reason ) ;
595+ }
592596 }
593597 return undefined ;
594598 } ,
You can’t perform that action at this time.
0 commit comments