cassava
Version:
AWS API Gateway Router
17 lines (16 loc) • 618 B
TypeScript
export declare class RestError extends Error {
statusCode: number;
additionalParams?: {
[key: string]: any;
};
readonly isRestError = true;
/**
* An Error that will be caught and turned into a JSON rest response.
* @param statusCode the HTTP status code to send (defaults to 500)
* @param message the message for the error (defaults to a description of statusCode)
* @param additionalParams additional properties to put on the JSON response object
*/
constructor(statusCode?: number, message?: string, additionalParams?: {
[key: string]: any;
});
}