-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
fixing enableExpressErrorHandler logic #6423
fixing enableExpressErrorHandler logic #6423
Conversation
01c1fec
to
0e750c4
Compare
Codecov Report
@@ Coverage Diff @@
## master #6423 +/- ##
==========================================
+ Coverage 93.96% 93.99% +0.02%
==========================================
Files 169 169
Lines 11787 11826 +39
==========================================
+ Hits 11076 11116 +40
+ Misses 711 710 -1
Continue to review full report at Codecov.
|
@hybeats Looking over it again this looks good. There are existing tests for this You add test cases here. Checkout the contributing guide on how to run tests https://github.com/parse-community/parse-server/blob/master/CONTRIBUTING.md |
@hybeats I fixed the test, @davimacedo Let me know if more tests are needed. |
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.
LGTM!
Hi @davimacedo @dplewis! I stumbled upon this PR since we're currently adopting Sentry error reporting for our backend. To use their errorHandler middleware we're required to set I checked the history and found the PR that introduced this feature from the beginning (#4697). The original intention seems to have been quite different. Instead of replacing the default Parse error handler it just used So by merging this fix it also seems to have broken the intended behaviour. A better way might have been to introduce a A workaround is of course to copy the logic from the Parse error handler and use that as a middleware in our own application, but that's not optimal. |
Hi @johanarnor . Thanks for bringing this back up. The idea of having a config option to switch/customize the behavior sounds reasonable to me. Would you mind to create a new issue for discussion? |
Yep, it's done. See 👆 |
fixing this issue
#6422