You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The pertinent part is that the breakage didn't trigger a traceback. This is because Flask's request.files is a MultiDict that maps KeyError to the BadRequest (HTTP 400) exception, and we don't trap 400 because it's an expected return condition from various API calls when some validation fails.
This is a problem. There could be such breakage elsewhere that we are not noticing because nobody has emailed us with a complaint. Ideally, MultiDict's KeyError should not be mapped to BadRequest, but since we can't make arbitrary changes to Werkzeug, we need to instead trap the specific error (using the exception subclass) and re-raise it as a 500, preserving the traceback.
The text was updated successfully, but these errors were encountered:
Hasjob recently broke with Chrome 64 because it doesn't upload empty stubs for files, and Hasjob expected one. Fixes: hasgeek/hasjob@a542b1b (incorrect), hasgeek/hasjob@0f747d9 (correct), hasgeek/hasjob@b13e914 (additional).
The pertinent part is that the breakage didn't trigger a traceback. This is because Flask's
request.files
is aMultiDict
that mapsKeyError
to theBadRequest
(HTTP 400) exception, and we don't trap 400 because it's an expected return condition from various API calls when some validation fails.This is a problem. There could be such breakage elsewhere that we are not noticing because nobody has emailed us with a complaint. Ideally,
MultiDict
'sKeyError
should not be mapped toBadRequest
, but since we can't make arbitrary changes to Werkzeug, we need to instead trap the specific error (using the exception subclass) and re-raise it as a 500, preserving the traceback.The text was updated successfully, but these errors were encountered: