Error messages#
Error messages that should be returned by the predictors in .json format. Values can follow the format described below (any type) or other/additional ones can be added by the Predictor builders.
We encourage Predictor builders to return error messages in the format show below using the appropriate HTTP error codes.
Error Key |
Type |
Status Code |
Description |
Examples of Messages |
|---|---|---|---|---|
|
array of strings |
400 |
The request was unacceptable; the model did not run. |
• JSON file is formatted incorrectly. |
|
array of strings |
422 |
The request was valid, but the model could not complete the prediction. |
• Sequence contains invalid characters. |
|
array of strings |
500 |
Backend/server issue that prevented prediction. |
• Socket communication failed. |
Notes#
Each error key corresponds to a Python exception class in the Predictor:
bad_prediction_request→BadRequestError(HTTP 400)prediction_request_failed→PredictionFailedError(HTTP 422)server_error→ServerError(HTTP 500)