Torchserve models now support
context.set_all_response_status(code=513)
and throwing PredictionException(message=traceback.format_exc(), error_code=513)
for example, our workflow named as “custom_workflow” and it has a model named “custom_model”, when I make request into wfpredict/custom_workflow with a wrong body it is throwing error but the response is always “InternalServerException Error executing …”, when I make request to predictions/custom_workflow__custom_model with same body, I am getting error code and my exception message correctly. How can I get same error message and custom error code which I defined ?
I tried to get custom error code and message via raising PredictionException(msg, code) and context.set_all_response_status(msg, code)
Onur Aydemir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.