Don't pass unexpected exception types to error handlers#2983
Don't pass unexpected exception types to error handlers#2983taion wants to merge 2 commits intopallets:masterfrom
Conversation
|
Like you, I think the current implementation is a bit confusing. But at least we can get the original error in the handler. This is useful for both logging and troubleshooting errors. But your solution doesn't take this into account. |
|
Perhaps Note, though, that the implementation above will forward the original error when the error handler is installed on |
|
I'm sorry to have misunderstood your solution. I think a test case for the handler of |
|
This assertion is actually already present in flask/tests/test_user_error_handler.py Line 43 in 92964b4 |
|
Oh, I see. I only read the codes in your patch. Please forgive me for wasting your precious time! |
|
I mean, now that you mention it, though, I do think it would be a better API if |
|
Yes, I quite agree with you.
|
This comment has been minimized.
This comment has been minimized.
|
While I understand the results of this, it's making the code harder to follow for me. Based on previous discussions in PRs that led to where we are now, it seems that it was intended that 500 and Instead, based on your discussions, I went the other direction and made it consistent. Thanks for discussing and working on this! Closing in favor of #3266 |
Fixes #2778
cc @ThiefMaster
This follows my last proposal in #2778 (comment).