openapi: Fix fixture rendering in rest-error-handling.

The fixtures are now rendered differently, and using
just 400 in fixture renders all the 400 fixtures with
descriptions, whereas 400_1 and 400_0 are invalid now.
This commit removes the hardcoded descriptions, and fixes
the fixture rendering.
This commit is contained in:
Suyash Vardhan Mathur 2021-07-01 03:02:19 +05:30 committed by Tim Abbott
parent ba36d46658
commit 9f45914196
1 changed files with 3 additions and 35 deletions

View File

@ -17,24 +17,9 @@ translated into French if the user has a French locale).
Each endpoint documents its own unique errors; below, we document Each endpoint documents its own unique errors; below, we document
errors common to many endpoints: errors common to many endpoints:
## Invalid API key {generate_code_example|/rest-error-handling:post|fixture(400)}
A typical failed JSON response for when the API key is invalid: {generate_code_example|/rest-error-handling:post|fixture(429)}
{generate_code_example|/rest-error-handling:post|fixture(400_0)}
## Missing request parameter(s)
A typical failed JSON response for when a required request parameter
is not supplied:
{generate_code_example|/rest-error-handling:post|fixture(400_1)}
## Rate limit exceeded
A typical failed JSON response for when a rate limit is exceeded:
{generate_code_example|/rest-error-handling:post|fixture(429_0)}
The `retry-after` paremeter in the response indicates how many seconds The `retry-after` paremeter in the response indicates how many seconds
the client must wait before making additional requests. the client must wait before making additional requests.
@ -62,21 +47,4 @@ When the Zulip server has configured multiple rate limits that apply
to a given request, the values returned will be for the strictest to a given request, the values returned will be for the strictest
limit. limit.
## User not authorized for query {generate_code_example|/rest-error-handling:post|fixture(403)}
A typical failed JSON response for when the user is not authorized for
a query:
{generate_code_example|/rest-error-handling:post|fixture(400_2)}
## User account deactivated
A typical failed json response for when user's account is deactivated:
{generate_code_example|/rest-error-handling:post|fixture(403_0)}
## Realm deactivated
A typical failed json response for when user's organization is deactivated:
{generate_code_example|/rest-error-handling:post|fixture(403_1)}