Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

fix: preserve context in for rejected promises #428

Merged
merged 1 commit into from
Feb 22, 2018

Conversation

urish
Copy link
Contributor

@urish urish commented Feb 17, 2018

currently, context is lost in case of an unhandled promise rejection. This fix keeps track of the context by looking into the rejected promise domain. This fix has been tested in my production environment and seems to do the trick there.

@kamilogorek
Copy link
Contributor

Thanks! It makes perfect sense. Could you please include a new test that'll verify that context is passed correctly? here's an example of promise test https://github.com/getsentry/raven-node/blob/master/test/raven.client.js#L399-L428

@urish
Copy link
Contributor Author

urish commented Feb 19, 2018

Okay, I will have a stab at it later

@urish urish force-pushed the patch-1 branch 2 times, most recently from cb5bf1a to 579c2fa Compare February 21, 2018 21:11
currently, context is lost in case of an unhandled promise rejection. This fix keeps track of the context by looking into the rejected promise domain. This fix has been tested in my production environment and seems to do the trick there.
@urish
Copy link
Contributor Author

urish commented Feb 21, 2018

Here we go - PR updated :)

@kamilogorek
Copy link
Contributor

Awesome! Thanks :)

@kamilogorek kamilogorek merged commit b54fdf2 into getsentry:master Feb 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants