Exceptions~RequestError(message, dataopt, codeopt)

Thrown to shortcut request handling and return an HTTP error.

new RequestError(message, dataopt, codeopt)

Parameters:
Name Type Attributes Default Description
message String The human-readable error message to send back in the JSON response data (in the "error" key).
data Object <optional>
{} Optional additional JSON data to send back in the error response body.
code Number <optional>
400 The HTTP status code to respond with; defaults to STATUS
See:

Members

static c2jSchema

Schema to use in SDKs

static respSchema

Schema to use on returned data

respData

Data to return to the caller