File tree Expand file tree Collapse file tree 2 files changed +24
-11
lines changed Expand file tree Collapse file tree 2 files changed +24
-11
lines changed Original file line number Diff line number Diff line change 1
1
# Changelog
2
2
3
+ ## [ Unreleased] ( https://github.com/Instabug/Instabug-React-Native/compare/v13.3.0...dev )
4
+
5
+ ### Fixed
6
+
7
+ - Fix Omitted non-error objects when logging errors to ensure only error objects are supported.([ #1279 ] ( https://github.com/Instabug/Instabug-React-Native/pull/1279 ) ).
8
+
3
9
## [ 13.3.0] ( https://github.com/Instabug/Instabug-React-Native/compare/v13.2.0...v13.3.0 ) (August 4, 2024)
4
10
5
11
### Added
Original file line number Diff line number Diff line change @@ -21,18 +21,25 @@ export const setEnabled = (isEnabled: boolean) => {
21
21
* @param nonFatalOptions extra config for the non-fatal error sent with Error Object
22
22
*/
23
23
export const reportError = ( error : ExtendedError , nonFatalOptions : NonFatalOptions = { } ) => {
24
- let level = NonFatalErrorLevel . error ;
25
- if ( nonFatalOptions . level != null ) {
26
- level = nonFatalOptions . level ;
24
+ if ( error instanceof Error ) {
25
+ let level = NonFatalErrorLevel . error ;
26
+ if ( nonFatalOptions . level != null ) {
27
+ level = nonFatalOptions . level ;
28
+ }
29
+ return InstabugUtils . sendCrashReport ( error , ( data ) =>
30
+ NativeCrashReporting . sendHandledJSCrash (
31
+ data ,
32
+ nonFatalOptions . userAttributes ,
33
+ nonFatalOptions . fingerprint ,
34
+ level ,
35
+ ) ,
36
+ ) ;
37
+ } else {
38
+ console . log (
39
+ `IBG-RN: The error ${ error } has been omitted because only error object is supported.` ,
40
+ ) ;
41
+ return ;
27
42
}
28
- return InstabugUtils . sendCrashReport ( error , ( data ) =>
29
- NativeCrashReporting . sendHandledJSCrash (
30
- data ,
31
- nonFatalOptions . userAttributes ,
32
- nonFatalOptions . fingerprint ,
33
- level ,
34
- ) ,
35
- ) ;
36
43
} ;
37
44
38
45
/**
You can’t perform that action at this time.
0 commit comments