Skip to content

Response error

Set errors in the response.

g.res.errors = [{ code: 400, message: "Error message here." }];

Response

{
    "success": false,
    "statusCode": 400,
    "errors": [
        {
            "code": 400,
            "message": "Error message here."
        }
    ],
    "warnings": []
}