[BUG] Better alignment with REST API: send 500 not 400 if predictor couldn't get loaded
atemate opened this issue ยท 1 comments
atemate commented
Describe the bug
Hi! first of all, thanks for such a neat tool! ๐
It's not a bug, I just thought that sending HTTP 400 is not good when the predictor couldn't get loaded (all /predict*
routes):
Lines 96 to 105 in 7ade99c
I think, it's better to use a 5XX server-side error:
- HTTP 400 means that there was a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
- HTTP 500 means that the server encountered an unexpected condition that prevented it from fulfilling the request. This error response is a generic "catch-all" response. Usually, this indicates the server cannot find a better 5xx error code to response.
htahir1 commented
Good catch! I pushed it now with this commit.. Also directly updated the base image so that it gets reflected on future runs (Not the most professional but I did not want to wait for the next release of BudgetML to accommodate this small request ๐ )