1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

docs: add 403 standard error (#1927)

This commit is contained in:
Gastón Fournier 2022-08-23 13:34:16 +02:00 committed by GitHub
parent 20d1d25934
commit 2eff58bd71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,11 @@ const unauthorizedResponse = {
'Authorization information is missing or invalid. Provide a valid API token as the `authorization` header, e.g. `authorization:*.*.my-admin-token`.',
} as const;
const forbiddenResponse = {
description:
'User credentials are valid but does not have enough privileges to execute this operation',
} as const;
const badRequestResponse = {
description: 'The request data does not match what we expect.',
} as const;
@ -23,6 +28,7 @@ const conflictResponse = {
const standardResponses = {
400: badRequestResponse,
401: unauthorizedResponse,
403: forbiddenResponse,
404: notFoundResponse,
409: conflictResponse,
} as const;