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 11# Changelog
22
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+
39## [ 13.3.0] ( https://github.com/Instabug/Instabug-React-Native/compare/v13.2.0...v13.3.0 ) (August 4, 2024)
410
511### Added
Original file line number Diff line number Diff line change @@ -21,18 +21,25 @@ export const setEnabled = (isEnabled: boolean) => {
2121 * @param nonFatalOptions extra config for the non-fatal error sent with Error Object
2222 */
2323export 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 ;
2742 }
28- return InstabugUtils . sendCrashReport ( error , ( data ) =>
29- NativeCrashReporting . sendHandledJSCrash (
30- data ,
31- nonFatalOptions . userAttributes ,
32- nonFatalOptions . fingerprint ,
33- level ,
34- ) ,
35- ) ;
3643} ;
3744
3845/**
You can’t perform that action at this time.
0 commit comments