-
Notifications
You must be signed in to change notification settings - Fork 50
Description
Describe the bug
The problem I am trying to solve is a related to this issue
Problem: Unable to view unhandled rejections in my crash / error reporting tool : datadog. They just disappear.
Solution explored: I am looking into patching react native's promise polyfill to surface the unhandled rejection but as a paid customer I am baffled how datadog doesn't inherently support this.
Please suggest an optimal way to capture the unhandled promise rejection error and view it in RUM error tracking. Is this something datadog sdks would support inherently in the future?
Thanks in advance,
Rama.
Reproduction steps
Fire such a function from any functional component in the app.
const unhandledRejectionFn = async() => {
throw new Error('Unhandled Rejection');
}
useEffect(() => {
// most of our sdk instantiations happen in a non blocking fashion this way
// need a way to be able to catch such rejections
void unhandledRejectionFn()
}, [])
These unhandled rejections are not caught by datadog automatically.
SDK logs
No response
Expected behavior
No response
Affected SDK versions
2.4.3
Latest working SDK version
NA
Did you confirm if the latest SDK version fixes the bug?
Yes
Integration Methods
Yarn
React Native Version
0.75.5
Package.json Contents
{
"react-native": "0.75.5",
"@datadog/mobile-react-native": "2.4.3",
iOS Setup
No response
Android Setup
No response
Device Information
No response
Other relevant information
No response