-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hotfix: promise rejection configuration (#2239)
* fix: 🐛 ensure reportUnhandledPromiseRejectionsAsHandled is impemented in all platforms * update CHANGELOG.md * test: 🩹 fix lineNumber assertion * test: ✅ add react native scenario for reportUnhandledPromiseRejectionsAsHandled * build: 🩹 update react-native fixture generate script * fix: ✏️ update typo in scenario name
- Loading branch information
1 parent
356951b
commit 7f1d209
Showing
15 changed files
with
88 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
test/node/features/fixtures/unhandled/scenarios/unhandled-promise-rejection-as-handled.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
var Bugsnag = require('@bugsnag/node') | ||
Bugsnag.start({ | ||
reportUnhandledPromiseRejectionsAsHandled: true, | ||
apiKey: process.env.BUGSNAG_API_KEY, | ||
endpoints: { | ||
notify: process.env.BUGSNAG_NOTIFY_ENDPOINT, | ||
sessions: process.env.BUGSNAG_SESSIONS_ENDPOINT | ||
} | ||
}) | ||
|
||
Promise.reject(new Error('not handled')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
...es/fixtures/app/scenario_js/app/scenarios/UnhandledJsPromiseRejectionAsHandledScenario.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import Scenario from './Scenario' | ||
|
||
export class UnhandledJsPromiseRejectionAsHandledScenario extends Scenario { | ||
constructor (configuration, jsConfig) { | ||
super() | ||
jsConfig.reportUnhandledPromiseRejectionsAsHandled = true | ||
} | ||
|
||
run () { | ||
Promise.reject(new Error('UnhandledJsPromiseRejectionAsHandledScenario')) | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
.../fixtures/scenario-launcher/src/scenarios/UnhandledJsPromiseRejectionAsHandledScenario.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import Scenario from './Scenario' | ||
|
||
export class UnhandledJsPromiseRejectionAsHandledScenario extends Scenario { | ||
constructor (configuration, jsConfig) { | ||
super() | ||
jsConfig.reportUnhandledPromiseRejectionsAsHandled = true | ||
} | ||
|
||
run () { | ||
Promise.reject(new Error('UnhandledJsPromiseRejectionAsHandledScenario')) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters