drf-standardized-errors: return the same response format for all 4xx and 5xx errors in your DRF API

This page summarizes the projects mentioned and recommended in the original post on /r/django

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • drf-standardized-errors

    Standardize your DRF API error responses

  • The package idea is simple: let’s create DRF APIs that care about error responses as much as they care about successful ones. As developers, It’s easy for us to focus on the API implementation for successful responses and forget about the pain of dealing with an API that provides different formats for error responses or that doesn’t even document its error responses. This is why I created drf-standardized-errors: it’s an exception handler that makes it easy to return a standard error format that is properly documented out of the box.

  • django-rest-framework

    Web APIs for Django. 🎸

  • The package idea is simple: let’s create DRF APIs that care about error responses as much as they care about successful ones. As developers, It’s easy for us to focus on the API implementation for successful responses and forget about the pain of dealing with an API that provides different formats for error responses or that doesn’t even document its error responses. This is why I created drf-standardized-errors: it’s an exception handler that makes it easy to return a standard error format that is properly documented out of the box.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • drf-spectacular

    Sane and flexible OpenAPI 3 schema generation for Django REST framework.

  • Generate OpenAPI3 schema for error responses using drf-spectacular: No API is complete without proper documentation. This is work in progress (PR1 and PR2). Most of it is done, but I still need to add tests and documentation. Hopefully, that will be done over the next few week(end)s. But, if you want to get a glimpse on the expected result, here’s a screenshot of a test endpoint using swagger UI.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts