django / django/new-features

Add a generic error view handler

Open
#104 1 comment 10 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
188
Forks
7
PR merge metrics
No merged PRs in 30d

Description

### Code of Conduct

- [x] I agree to follow Django's Code of Conduct

### Feature Description

This proposal recommends adding a generic error view handler, refactor existing code to build around this generic handler and allow for error handling views for errors (4xx and 5xx) that are currently not supported.

### Problem

Currently there are a handful of error views that can be overridden with custom views (see: https://docs.djangoproject.com/en/dev/ref/views/#error-views). To add new error handler views for other error codes (like 413 see: https://code.djangoproject.com/ticket/35281) requires the ticket and PR process. A generic handler would allow for any currently unsupported error code to be handled with a custom view.

### Request or proposal

request

### Additional Details

The conversation on the PR is where the idea of refactoring the error view comes from: https://github.com/django/django/pull/17960/files.

This PR was a work in progress on an idea for a generic handler: https://github.com/django/django/pull/18725

### Implementation Suggestions

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.