iceshrimp/packages/backend/src/server/api/openapi/errors.ts

72 lines
1.4 KiB
TypeScript
Raw Normal View History

2019-02-24 04:08:08 +09:00
export const errors = {
2023-01-13 13:40:33 +09:00
"400": {
INVALID_PARAM: {
2019-02-24 04:08:08 +09:00
value: {
error: {
2023-01-13 13:40:33 +09:00
message: "Invalid param.",
code: "INVALID_PARAM",
id: "3d81ceae-475f-4600-b2a8-2bc116157532",
2021-12-09 23:58:30 +09:00
},
},
},
2019-02-24 04:08:08 +09:00
},
2023-01-13 13:40:33 +09:00
"401": {
CREDENTIAL_REQUIRED: {
2019-02-24 04:08:08 +09:00
value: {
error: {
2023-01-13 13:40:33 +09:00
message: "Credential required.",
code: "CREDENTIAL_REQUIRED",
id: "1384574d-a912-4b81-8601-c7b1c4085df1",
2021-12-09 23:58:30 +09:00
},
},
},
2019-02-24 04:08:08 +09:00
},
2023-01-13 13:40:33 +09:00
"403": {
AUTHENTICATION_FAILED: {
2019-02-24 04:08:08 +09:00
value: {
error: {
2023-01-13 13:40:33 +09:00
message:
"Authentication failed. Please ensure your token is correct.",
code: "AUTHENTICATION_FAILED",
id: "b0a7f5f8-dc2f-4171-b91f-de88ad238e14",
2021-12-09 23:58:30 +09:00
},
},
},
2019-02-24 04:08:08 +09:00
},
2023-01-13 13:40:33 +09:00
"418": {
I_AM_CALC: {
2019-02-24 04:08:08 +09:00
value: {
error: {
2023-01-13 13:40:33 +09:00
message:
"You sent a request to Calc, Calckey's resident stoner furry, instead of the server.",
code: "I_AM_CALC",
id: "60c46cd1-f23a-46b1-bebe-5d2b73951a84",
2021-12-09 23:58:30 +09:00
},
},
},
2019-02-24 04:08:08 +09:00
},
2023-01-13 13:40:33 +09:00
"429": {
RATE_LIMIT_EXCEEDED: {
2019-02-24 04:08:08 +09:00
value: {
error: {
2023-01-13 13:40:33 +09:00
message: "Rate limit exceeded. Please try again later.",
code: "RATE_LIMIT_EXCEEDED",
id: "d5826d14-3982-4d2e-8011-b9e9f02499ef",
2021-12-09 23:58:30 +09:00
},
},
},
2019-02-24 04:08:08 +09:00
},
2023-01-13 13:40:33 +09:00
"500": {
INTERNAL_ERROR: {
2019-02-24 04:08:08 +09:00
value: {
error: {
2023-01-13 13:40:33 +09:00
message:
"Internal error occurred. Please contact us if the error persists.",
code: "INTERNAL_ERROR",
id: "5d37dbcb-891e-41ca-a3d6-e690c97775ac",
2021-12-09 23:58:30 +09:00
},
},
},
},
2019-02-24 04:08:08 +09:00
};