UNPKG

1.37 kBTypeScriptView Raw
1import { HttpStatusCodes } from '../Server';
2import { Response } from './Response';
3export declare class ServerErrorResponse extends Response {
4 static create(statusCode: HttpStatusCodes, message?: string, data?: any, meta?: Object): ServerErrorResponse;
5 static internalServerError(message?: string, data?: any, meta?: Object): ServerErrorResponse;
6 static notImplemented(message?: string, data?: any, meta?: Object): ServerErrorResponse;
7 static badGateway(message?: string, data?: any, meta?: Object): ServerErrorResponse;
8 static serviceUnavailable(message?: string, data?: any, meta?: Object): ServerErrorResponse;
9 static gatewayTimeout(message?: string, data?: any, meta?: any): ServerErrorResponse;
10 static httpVersionNotSupported(message?: string, data?: any, meta?: any): ServerErrorResponse;
11 static variantAlsoNegotiates(message?: string, data?: any, meta?: any): ServerErrorResponse;
12 static insufficientStorage(message?: string, data?: any, meta?: any): ServerErrorResponse;
13 static loopDetected(message?: string, data?: any, meta?: any): ServerErrorResponse;
14 static notExtended(message?: string, data?: any, meta?: any): ServerErrorResponse;
15 static networkAuthenticationRequired(message?: string, data?: any, meta?: any): ServerErrorResponse;
16 format(): {
17 message?: string;
18 data?: any;
19 };
20}