UNPKG

1.22 kBJavaScriptView Raw
1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT license.
3/**
4 * @hidden
5 */
6export const StatusCodes = {
7 // Success
8 Ok: 200,
9 Created: 201,
10 Accepted: 202,
11 NoContent: 204,
12 NotModified: 304,
13 // Client error
14 BadRequest: 400,
15 Unauthorized: 401,
16 Forbidden: 403,
17 NotFound: 404,
18 MethodNotAllowed: 405,
19 RequestTimeout: 408,
20 Conflict: 409,
21 Gone: 410,
22 PreconditionFailed: 412,
23 RequestEntityTooLarge: 413,
24 TooManyRequests: 429,
25 RetryWith: 449,
26 // Server Error
27 InternalServerError: 500,
28 ServiceUnavailable: 503,
29 // System codes
30 ENOTFOUND: "ENOTFOUND",
31 // Operation pause and cancel. These are FAKE status codes for QOS logging purpose only.
32 OperationPaused: 1200,
33 OperationCancelled: 1201,
34};
35/**
36 * @hidden
37 */
38export const SubStatusCodes = {
39 Unknown: 0,
40 // 400: Bad Request Substatus
41 CrossPartitionQueryNotServable: 1004,
42 // 410: StatusCodeType_Gone: substatus
43 PartitionKeyRangeGone: 1002,
44 // 404: NotFound Substatus
45 ReadSessionNotAvailable: 1002,
46 // 403: Forbidden Substatus
47 WriteForbidden: 3,
48 DatabaseAccountNotFound: 1008,
49};
50//# sourceMappingURL=statusCodes.js.map
\No newline at end of file