f7
f7 is a spreadsheet formula execution library
git clone https://git.vogt.world/f7.git
Log | Files | README.md | LICENSE.md
← All files
name: src/main/js/common/errors/StatusCodes.ts
-rw-r--r--
1013
 1/**
 2 * Errors roughly derived from https://cloud.google.com/apis/design/errors.
 3 */
 4export namespace StatusCodes {
 5  export const OK = 200;
 6  export const INVALID_ARGUMENT = 400;
 7  export const FAILED_PRECONDITION = 400;
 8  export const OUT_OF_RANGE = 400;
 9  export const UNAUTHENTICATED = 401;
10  export const PERMISSION_DENIED = 403;
11  export const NOT_FOUND = 404;
12  export const ABORTED = 409;
13  export const ALREADY_EXISTS = 409;
14  export const RESOURCE_EXHAUSTED = 429;
15  export const CANCELLED = 499;
16  export const UNKNOWN = 500;
17  export const INTERNAL = 500;
18  export const NOT_IMPLEMENTED = 501;
19  export const UNAVAILABLE = 503;
20  export const DEADLINE_EXCEEDED = 504;
21
22  export const ALL_BAD_CODES = new Set([
23    INVALID_ARGUMENT,
24    FAILED_PRECONDITION,
25    OUT_OF_RANGE,
26    UNAUTHENTICATED,
27    PERMISSION_DENIED,
28    NOT_FOUND,
29    ABORTED,
30    ALREADY_EXISTS,
31    RESOURCE_EXHAUSTED,
32    CANCELLED,
33    UNKNOWN,
34    INTERNAL,
35    NOT_IMPLEMENTED,
36    UNAVAILABLE,
37    DEADLINE_EXCEEDED,
38  ]);
39}