Skip to content

Response warnings

Set warnings in the response.

g.res.warnings = [{ code: 401, message: "This is warning!" }];
return { hello: 'v2' };

Response

{
    "success": true,
    "statusCode": 200,
    "data": {
        "hello": "v2"
    },
    "warnings": [
        {
            "code": 401,
            "message": "This is warning!"
        }
    ]
}