Skip to content

Traceback HTML not shown in browsable API #4042

Closed
@ychouinard

Description

@ychouinard

In the browsable API, when I submit a form and it causes a 500 error, the page gets reloaded instead of showing Django's 500 template.

For ajax requests, the 500 response is sent in plain text (https://github.com/django/django/blob/master/django/views/debug.py#L74) and in the browsable api, the page is redirected to itself when the response is not in HTML (https://github.com/tomchristie/django-rest-framework/blob/566812ac0b577f79801ec67f86f064cf39ebee01/rest_framework/static/rest_framework/js/ajax-form.js#L65)

It would be great to show the error details somehow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions