File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -228,9 +228,9 @@ export function eventFromUnknownInput(
228
228
229
229
return event ;
230
230
}
231
- if ( isError ( exception as Error ) ) {
231
+ if ( isError ( exception ) ) {
232
232
// we have a real Error object, do nothing
233
- return eventFromError ( exception as Error ) ;
233
+ return eventFromError ( exception ) ;
234
234
}
235
235
if ( isPlainObject ( exception ) || isEvent ( exception ) ) {
236
236
// If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ export class ExtraErrorData implements Integration {
105
105
continue ;
106
106
}
107
107
const value = error [ key ] ;
108
- extraErrorInfo [ key ] = isError ( value ) ? ( value as Error ) . toString ( ) : value ;
108
+ extraErrorInfo [ key ] = isError ( value ) ? value . toString ( ) : value ;
109
109
}
110
110
111
111
// Check if someone attached `toJSON` method to grab even more properties (eg. axios is doing that)
@@ -114,7 +114,7 @@ export class ExtraErrorData implements Integration {
114
114
115
115
for ( const key of Object . keys ( serializedError ) ) {
116
116
const value = serializedError [ key ] ;
117
- extraErrorInfo [ key ] = isError ( value ) ? ( value as Error ) . toString ( ) : value ;
117
+ extraErrorInfo [ key ] = isError ( value ) ? value . toString ( ) : value ;
118
118
}
119
119
}
120
120
You can’t perform that action at this time.
0 commit comments