Contact support

Error responses for all routes

Overview

This document covers the HTTP error responses that might occur with any route. Responses specific to a particular route are documented in that route’s section.

400 Bad Request

The server couldn't understand the request due to invalid syntax.

401 Unauthorized

Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response.

403 Forbidden

The client doesn't have access rights to the content; that is, it is unauthorized to access it.

Example

{
    "type": "Forbidden",
    "code": 403,
    "message": "Invalid API key.",
    "name": "ForbiddenError"
}

404 Not Found

The requested route or resource couldn't be found.

Example

{
    "type": "NOT_FOUND",
    "code": 404,
    "message": "Not found",
    "name": "NotFoundError"
}

422 Unprocessable Entity

It usually means that a required parameter is missing from the request body.

Example

{
    "type": "VALIDATION_ERROR",
    "code": 422,
    "message": "Parameters validation error!",
    "data": [
        {
            "keyword": "required",
            "dataPath": "",
            "schemaPath": "#/required",
            "params": {
                "missingProperty": "name"
            },
            "message": "should have required property 'name'"
        }
    ],
    "name": "ValidationError"
}

500 Internal Server Error

The server encountered an unexpected condition that prevented it from fulfilling the request. Additional details might be provided in the response body.

Example

{
    "type": "ERR_SSAI_API",
    "code": 500,
    "message": "SSAI API update error",
    "data": "id cannot be changed",
    "name": "MoleculerError"
}