Skip to content

API should use a error serializers for documenting error responses instead of an error class #4127

Closed

Description

Description

The API does not set up the error response documentation correctly.

Reproduction

  1. Run the api locally using `just api/up`
  2. Look at the API logs.
  3. See warnings.
/api/api/views/oauth2_views.py: Warning [CheckRates]: could not resolve "<class 'rest_framework.exceptions.PermissionDenied'>" for GET /v1/rate_limit/. Expected either a serializer or some supported override mechanism. Defaulting to generic free-form object.
4. Go to localhost:50280, and look at the documentation for error responses. See that they use a generic object instead of an object that has the same shape as our error responses:
Screenshot 2024-04-16 at 12 58 17 PM

Additional context

Noticed during review of #4126

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Labels

Type

No type

Projects

  • Status

    ✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions