Error messages

Contents

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

bad_prediction_request

array of strings

400

The request was unacceptable; the model did not run.

• JSON file is formatted incorrectly.
• Mandatory key missing (e.g., readout, sequences).
• Invalid type or readout value.
• Duplicate sequence ID keys.
prediction_ranges not integers or mismatched with sequences.
• Invalid characters in sequence IDs.

prediction_request_failed

array of strings

422

The request was valid, but the model could not complete the prediction.

• Sequence contains invalid characters.
• Model cannot handle sequence lengths this large.

server_error

array of strings

500

Backend/server issue that prevented prediction.

• Socket communication failed.
• Memory error (e.g., large batch or JSON file).
• Wifi/network error.


Notes#

  • Each error key corresponds to a Python exception class in the Predictor:

    • bad_prediction_requestBadRequestError (HTTP 400)

    • prediction_request_failedPredictionFailedError (HTTP 422)

    • server_errorServerError (HTTP 500)