Handling of exceptions and https return code in MMS

In MXNet Model Server, sometimes the need arises to do some user input checks: Image size, parameter validation, etc.
In case the user inputs do not meet the validation, it would be nice to be able to control the HTTP return code in order to give fine-grained feedback to the user. https://docs.python.org/3/library/http.html
Ideally I am thinking a custom MMSError(HTTP_status, text) that would let you control what get returned to the user. Is it currently possible? If not, I would like to propose it as a feature request and add documentation of the current exception handling behavior.
Thanks!

@lupesko

I agree, this is a good feature to have in MMS. We will look into having custom errors back to the clients.

1 Like