Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1847 improve handling when djdt views dont respond with json #1877

Conversation

elineda
Copy link
Member

@elineda elineda commented Feb 6, 2024

Description

Put a better error message when the response of the toolbar request is not a proper json object.

For test it, add after line 48 of debug_toolbar/middleware.py

from django.shortcuts import redirect
return redirect('admin:login')

Fixes #1847

Checklist:

  • I have added the relevant tests for this change.
  • I have added an item to the Pending section of docs/changes.rst.

[m] add a catch for catch json error and display it with a better message
[m] Put a better response
[+] Add changelog
@elineda elineda self-assigned this Feb 6, 2024
docs/changes.rst Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve handling when DJDT views don't respond with JSON
4 participants