UNPKG

@blackglory/http-status

Version:
60 lines 2.52 kB
import { HTTPError } from './http-error.js'; import { ServerError } from './enum.js'; export class HTTPServerError extends HTTPError { } export class InternalServerError extends HTTPServerError { constructor(message) { super(ServerError.InternalServerError, message !== null && message !== void 0 ? message : 'Internal Server Error'); } } export class NotImplemented extends HTTPServerError { constructor(message) { super(ServerError.NotImplemented, message !== null && message !== void 0 ? message : 'Not Implemented'); } } export class BadGateway extends HTTPServerError { constructor(message) { super(ServerError.BadGateway, message !== null && message !== void 0 ? message : 'Bad Gateway'); } } export class ServiceUnavailable extends HTTPServerError { constructor(message) { super(ServerError.ServiceUnavailable, message !== null && message !== void 0 ? message : 'Service Unavailable'); } } export class GatewayTimeout extends HTTPServerError { constructor(message) { super(ServerError.GatewayTimeout, message !== null && message !== void 0 ? message : 'Gateway Timeout'); } } export class HTTPVersionNotSupported extends HTTPServerError { constructor(message) { super(ServerError.HTTPVersionNotSupported, message !== null && message !== void 0 ? message : 'HTTP Version Not Supported'); } } export class VariantAlsoNegotiates extends HTTPServerError { constructor(message) { super(ServerError.VariantAlsoNegotiates, message !== null && message !== void 0 ? message : 'Variant Also Negotiates'); } } export class InsufficientStorage extends HTTPServerError { constructor(message) { super(ServerError.InsufficientStorage, message !== null && message !== void 0 ? message : 'Insufficient Storage'); } } export class LoopDetected extends HTTPServerError { constructor(message) { super(ServerError.LoopDetected, message !== null && message !== void 0 ? message : 'Loop Detected'); } } export class NotExtended extends HTTPServerError { constructor(message) { super(ServerError.NotExtended, message !== null && message !== void 0 ? message : 'Not Extended'); } } export class NetworkAuthenticationRequired extends HTTPServerError { constructor(message) { super(ServerError.NetworkAuthenticationRequired, message !== null && message !== void 0 ? message : 'Network Authentication Required'); } } //# sourceMappingURL=http-server-error.js.map