Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HTTP 429 Too Many Requests as a possible generic error response #1226

Merged
merged 2 commits into from
May 29, 2024

Conversation

js-nh
Copy link
Contributor

@js-nh js-nh commented May 20, 2024

Fixes #

Description of the Change

Adds 429 Too Many Requests as a possible generic error response.

Discovered during an OpenAPI schema validation run as our generic error responses were not found in the schema.

This is essentially same as #1165 but for 429 status code.

Checklist

  • PR only contains one change (considered splitting up PR)
  • unit-test added
  • documentation updated
  • CHANGELOG.md updated (only for user relevant changes)
  • author name in AUTHORS

@js-nh js-nh force-pushed the openapi-429-too-many-requests branch from f71e0df to 0a27fa9 Compare May 21, 2024 08:42
@js-nh
Copy link
Contributor Author

js-nh commented May 21, 2024

There was a typo - I had a trailing , in the json structure. It should be resolved now, tests are passing locally.

@js-nh
Copy link
Contributor Author

js-nh commented May 23, 2024

@sliverc Could I ask you to review this and tell me how I could proceed with getting this merged, if possible?

Copy link
Member

@sliverc sliverc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the addition. This looks good to me and ready to merge.

Please note though that OpenAPI schema support will be deprecated in DJA as soon as Django REST framework will deprecate it. Best take a look at #1082 for more details.

As for small fixes like this, we still integrate into DJA for the time being. I would highly recommend you though to get involved with the drf-spectecular-json-api which will be the successor of the schema generation in the near future.

@sliverc sliverc merged commit 21493c1 into django-json-api:main May 29, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants