{"categories":[{"label":"Dynamic Content","url":"https://skillfed.io/packages/category/internet-www-http-dynamic-content"}],"enrichment":{"capability":"Standardizes Django REST Framework exception responses into a consistent, machine-parseable JSON format with type, code, detail, and attribute fields to simplify frontend error handling.","skillfed_tags":["django-rest-framework","error-handling","api-standardization"],"use_cases":["Simplify frontend error parsing by ensuring all API errors follow a single, predictable JSON schema across your DRF endpoints.","Integrate error reporting to external services (Sentry, NewRelic) by configuring the EXCEPTION_REPORTING handler.","Display all validation failures to users in a single form submission instead of stopping at the first error.","Provide consistent error codes and messages across multiple frontend frameworks or mobile apps consuming the same API.","Customize error attribute naming for nested serializers using the NESTED_KEY_SEPARATOR setting."],"what_it_does":"DRF Exceptions Hog wraps Django REST Framework's exception handling to transform inconsistent error responses into a predictable, structured format. Instead of varying response shapes\u2014some with field-level errors as arrays, others with a single detail string\u2014it normalizes all exceptions to a consistent schema with type, code, detail, attr, and optional list fields. This makes frontend error parsing deterministic across languages and frameworks.\n\nThe package is configured via a single settings entry that replaces DRF's default exception handler. It supports optional error reporting hooks (useful for Sentry or NewRelic integration), nested field error flattening with customizable separators, and an opt-in mode to collect and return multiple validation errors in a single response rather than failing on the first. It requires only djangorestframework as a runtime dependency and works with Python 3.7+.","worth_installing":"Yes. Low install friction, active maintenance, no known vulnerabilities, and permissive MIT license. Install if you use Django REST Framework and want to eliminate frontend error-parsing complexity by standardizing exception responses. Skip only if you have already built custom exception handling or do not expose DRF errors to frontend clients."},"id":"drf-exceptions-hog","links":{"html":"https://skillfed.io/packages/drf-exceptions-hog","md":"https://skillfed.io/packages/drf-exceptions-hog.md","pypi":"https://pypi.org/project/drf-exceptions-hog/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2023-05-08","license_spdx":null,"license_treatment":"permissive","name":"drf-exceptions-hog","python_support":"supports_current","summary":"Standardized and easy-to-parse API error responses for DRF."},"popularity":{"monthly_downloads":2092643,"position":3301,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"0.4.0"}
