mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-11 00:08:30 +01:00
docs: add 403 standard error (#1927)
This commit is contained in:
parent
20d1d25934
commit
2eff58bd71
@ -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`.',
|
'Authorization information is missing or invalid. Provide a valid API token as the `authorization` header, e.g. `authorization:*.*.my-admin-token`.',
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
|
const forbiddenResponse = {
|
||||||
|
description:
|
||||||
|
'User credentials are valid but does not have enough privileges to execute this operation',
|
||||||
|
} as const;
|
||||||
|
|
||||||
const badRequestResponse = {
|
const badRequestResponse = {
|
||||||
description: 'The request data does not match what we expect.',
|
description: 'The request data does not match what we expect.',
|
||||||
} as const;
|
} as const;
|
||||||
@ -23,6 +28,7 @@ const conflictResponse = {
|
|||||||
const standardResponses = {
|
const standardResponses = {
|
||||||
400: badRequestResponse,
|
400: badRequestResponse,
|
||||||
401: unauthorizedResponse,
|
401: unauthorizedResponse,
|
||||||
|
403: forbiddenResponse,
|
||||||
404: notFoundResponse,
|
404: notFoundResponse,
|
||||||
409: conflictResponse,
|
409: conflictResponse,
|
||||||
} as const;
|
} as const;
|
||||||
|
Loading…
Reference in New Issue
Block a user