-
Notifications
You must be signed in to change notification settings - Fork 257
Open
Description
Steps to reproduce
Add this to a react-native project and tap that button in debug mode.
import Bugsnag from '@bugsnag/react-native';
import { Button, View } from 'react-native';
export default function App() {
return (
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
<Button
title="simulate error"
onPress={() => {
try {
throw new Error('custom error is not logged');
} catch (error) {
Bugsnag.notify(new Error('Failed to initialize SDK'), event => {
event.severity = 'warning';
event.addMetadata('Additional Info', { originalError: error }); // this is throwing an error and not being included in metadata in debug mode
});
}
}}
/>
</View>
);
} ERROR [bugsnag] Error occurred in onError callback, continuing anyway…
ERROR [bugsnag] [ReferenceError: Property 'error' doesn't exist]This does not seem to happen in production, though, and it keeps passing originalError as an AdditionalInfo. Just in debug mode, it throws that error and ignores that property.
Metadata
Metadata
Assignees
Labels
No labels