-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(js): reload unhandledRejection and uncaughtException plugins on configure #1184
Conversation
@@ -22,14 +22,6 @@ export default class UncaughtExceptionMonitor { | |||
makeListener() { | |||
const honeybadgerUncaughtExceptionListener = (uncaughtError: Error) => { | |||
if (this.__isReporting || !this.__client) { return } | |||
|
|||
if (!this.__client.config.enableUncaught) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant now that the listener is removed in this case
@@ -18,13 +18,6 @@ export default class UnhandledRejectionMonitor { | |||
|
|||
makeListener() { | |||
const honeybadgerUnhandledRejectionListener = (reason: unknown, _promise: Promise<unknown>) => { | |||
if (!this.__client || !this.__client.config.enableUnhandledRejection) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant now that the listener is removed in this case.
I'd only included !this.__client
here because typescript wouldn't let me check !this.__client.config.enableUnhandledRejection
otherwise.
expect(Singleton.config.__plugins.length).toBe(2) | ||
}) | ||
|
||
it('clients produced via factory don\'t include plugins', function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are debating whether this is what we want in #1181, but I figured I'd document the current behavior.
Status
READY
Description
Part of #1163
Core version 6.3.0 includes the ability for plugins to set
shouldReloadOnConfigure
. This PR turns that on for theunhandledRejection
anduncaughtException
plugins.Related PRs
Listed in #1163
Todos
Steps to Test or Reproduce
cd packages/js npm run test:server