Repository navigation
Added a optional config variable to disable centralized error handler in recovery middleware - #2410
Conversation
|
Should I pass back the error with closure, so upstream middlewares can handle ? |
I have returned back the error, seems like that should be the ideal behavior, also added corrected tests |
…r is only returned back if centralized error handler is disabled, improved test cases
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2410 +/- ##
=======================================
Coverage 92.84% 92.85%
=======================================
Files 39 39
Lines 4503 4507 +4
=======================================
+ Hits 4181 4185 +4
Misses 234 234
Partials 88 88 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
For history sake - not returning error by default bothers me as it would be more correct behavior. But this would make middleware behave completely different as it has done since 2015. These simple things can be problematic as it changes how already existing application middleware chain work. Probably 98% time this is not an issue - but for some it could be. life is about making compromises. p.s. just looked my |
Recovery Middleware calls the centralized Error Handler. This is a change to have a optional config variable to disable centralized error handler in recovery. If the centrailzed Error Handler is disabled, panic error caught, will be returned to upstream middleware.