Skip to content

Traceback HTML not shown in browsable API #4042

@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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy