smartstatus/ts/smartstatus.classes.http.5xx.ts

138 lines
4.0 KiB
TypeScript
Raw Normal View History

2019-01-02 00:00:53 +00:00
import { HttpStatus, TStatusGroup } from './smartstatus.classes.http';
2017-04-06 15:00:38 +00:00
2019-01-02 01:08:12 +00:00
export class Status500 extends HttpStatus {
2019-01-02 00:00:53 +00:00
constructor() {
super({
code: 500,
text: 'Internal Server Error',
description:
2021-08-16 13:36:41 +00:00
'A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.',
2019-01-02 00:00:53 +00:00
});
2017-04-06 15:00:38 +00:00
}
}
2019-01-02 01:08:12 +00:00
HttpStatus.addStatus('500', Status500);
2019-01-02 01:08:12 +00:00
// tslint:disable-next-line: max-classes-per-file
export class Status501 extends HttpStatus {
2019-01-02 00:00:53 +00:00
constructor() {
super({
code: 501,
text: 'Bad Request',
2021-08-16 13:36:41 +00:00
description: `The server cannot or will not process the request due to an apparent client error (e.g., malformed request syntax, too large size, invalid request message framing, or deceptive request routing).`,
2019-01-02 00:00:53 +00:00
});
}
}
2019-01-02 01:08:12 +00:00
HttpStatus.addStatus('501', Status501);
2019-01-02 01:08:12 +00:00
// tslint:disable-next-line: max-classes-per-file
export class Status502 extends HttpStatus {
2019-01-02 00:00:53 +00:00
constructor() {
super({
code: 502,
text: 'Payment Required',
2021-08-16 13:36:41 +00:00
description: `The request was valid, but the server is refusing action. The user might not have the necessary permissions for a resource.`,
2019-01-02 00:00:53 +00:00
});
}
}
2019-01-02 01:08:12 +00:00
HttpStatus.addStatus('502', Status502);
2019-01-02 01:08:12 +00:00
// tslint:disable-next-line: max-classes-per-file
export class Status503 extends HttpStatus {
2019-01-02 00:00:53 +00:00
constructor() {
super({
code: 503,
text: 'Forbidden',
2021-08-16 13:36:41 +00:00
description: `The request was valid, but the server is refusing action. The user might not have the necessary permissions for a resource.`,
2019-01-02 00:00:53 +00:00
});
}
}
2019-01-02 01:08:12 +00:00
HttpStatus.addStatus('503', Status503);
2019-01-02 01:08:12 +00:00
// tslint:disable-next-line: max-classes-per-file
export class Status504 extends HttpStatus {
2019-01-02 00:00:53 +00:00
constructor() {
super({
code: 504,
text: 'Gateway Time-out',
description: `The server was acting as a gateway or proxy
2021-08-16 13:36:41 +00:00
and did not receive a timely response from the upstream server.`,
2019-01-02 00:00:53 +00:00
});
}
}
2019-01-02 01:08:12 +00:00
HttpStatus.addStatus('504', Status504);
2019-01-02 01:08:12 +00:00
// tslint:disable-next-line: max-classes-per-file
export class Status505 extends HttpStatus {
2019-01-02 00:00:53 +00:00
constructor() {
super({
code: 505,
text: 'HTTP Version Not Supported',
2021-08-16 13:36:41 +00:00
description: `The server does not support the HTTP protocol version used in the request.`,
2019-01-02 00:00:53 +00:00
});
}
}
2019-01-02 01:08:12 +00:00
HttpStatus.addStatus('505', Status505);
2019-01-02 01:08:12 +00:00
// tslint:disable-next-line: max-classes-per-file
export class Status506 extends HttpStatus {
2019-01-02 00:00:53 +00:00
constructor() {
super({
code: 506,
text: 'Variant Also Negotiates',
2021-08-16 13:36:41 +00:00
description: `Transparent content negotiation for the request results in a circular reference.`,
2019-01-02 00:00:53 +00:00
});
}
}
2019-01-02 01:08:12 +00:00
HttpStatus.addStatus('506', Status506);
// tslint:disable-next-line: max-classes-per-file
export class Status507 extends HttpStatus {
2019-01-02 00:00:53 +00:00
constructor() {
super({
code: 507,
text: 'Insufficient Storage',
2021-08-16 13:36:41 +00:00
description: `The server is unable to store the representation needed to complete the request.`,
2019-01-02 00:00:53 +00:00
});
}
}
2019-01-02 01:08:12 +00:00
HttpStatus.addStatus('507', Status507);
// tslint:disable-next-line: max-classes-per-file
export class Status508 extends HttpStatus {
2019-01-02 00:00:53 +00:00
constructor() {
super({
code: 508,
text: 'Loop Detected',
2021-08-16 13:36:41 +00:00
description: `The server detected an infinite loop while processing the request`,
2019-01-02 00:00:53 +00:00
});
}
}
2019-01-02 01:08:12 +00:00
HttpStatus.addStatus('508', Status508);
2019-01-02 01:08:12 +00:00
// tslint:disable-next-line: max-classes-per-file
export class Status510 extends HttpStatus {
2019-01-02 00:00:53 +00:00
constructor() {
super({
code: 510,
text: 'Loop Detected',
2021-08-16 13:36:41 +00:00
description: `The server detected an infinite loop while processing the request`,
2019-01-02 00:00:53 +00:00
});
}
}
2019-01-02 01:08:12 +00:00
// tslint:disable-next-line: max-classes-per-file
export class Status511 extends HttpStatus {
2019-01-02 00:00:53 +00:00
constructor() {
super({
code: 511,
text: 'Network Authentication Required',
description: `The client needs to authenticate to gain network access.
Intended for use by intercepting proxies used to control access to the network
2021-08-16 13:36:41 +00:00
(e.g., "captive portals" used to require agreement to Terms of Service before granting full Internet access via a Wi-Fi hotspot)`,
2019-01-02 00:00:53 +00:00
});
}
2019-01-02 00:00:53 +00:00
}
2019-01-02 01:08:12 +00:00
HttpStatus.addStatus('511', Status511);