From 52774bbe6402aee076b2e0648bd1f4764924da8a Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 23 Feb 2019 11:20:58 +0900 Subject: Introduce OpenAPI specs (#4351) * wip * wip * wip * Update index.ts * Update gen-openapi-spec.ts * Update api.ja-JP.md * Fix * Improve doc * Update gen-openapi-spec.ts * Update redoc.html * Improve doc * Update gen-openapi-spec.ts * Improve doc * Update CHANGELOG.md --- src/server/api/call.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/server/api/call.ts') diff --git a/src/server/api/call.ts b/src/server/api/call.ts index 106f0937b6..4b3d4cfbe3 100644 --- a/src/server/api/call.ts +++ b/src/server/api/call.ts @@ -21,6 +21,7 @@ export default async (endpoint: string, user: IUser, app: IApp, data: any, file? message: 'No such endpoint.', code: 'NO_SUCH_ENDPOINT', id: 'f8080b67-5f9c-4eb7-8c18-7f1eeae8f709', + httpStatusCode: 404 }); } @@ -33,6 +34,7 @@ export default async (endpoint: string, user: IUser, app: IApp, data: any, file? message: 'Credential required.', code: 'CREDENTIAL_REQUIRED', id: '1384574d-a912-4b81-8601-c7b1c4085df1', + httpStatusCode: 401 }); } @@ -63,6 +65,7 @@ export default async (endpoint: string, user: IUser, app: IApp, data: any, file? message: 'Rate limit exceeded. Please try again later.', code: 'RATE_LIMIT_EXCEEDED', id: 'd5826d14-3982-4d2e-8011-b9e9f02499ef', + httpStatusCode: 429 }); }); } -- cgit v1.2.3-freya