The Wayback Machine - https://web.archive.org/web/20220614083103/https://github.com/encode/django-rest-framework/issues/7953
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

"No POST data" in error report #7953

Open
3 tasks done
bblanchon opened this issue Apr 27, 2021 · 6 comments
Open
3 tasks done

"No POST data" in error report #7953

bblanchon opened this issue Apr 27, 2021 · 6 comments

Comments

@bblanchon
Copy link

@bblanchon bblanchon commented Apr 27, 2021

Checklist

  • Raised initially as discussion #7899
  • This cannot be dealt with as a third party library. (We prefer new functionality to be in the form of third party libraries where possible.)
  • I have reduced the issue to the simplest possible case.

Description

I'm using Django 3.1.7 & DRF 3.12.2.
When an exception occurs in a ViewSet, Django automatically sends an email to the administrator.

The problem is that the POST data is always empty in this email:

POST: No POST data

Instead, I expect to see the JSON payload that was sent in the request body.

I added a breakpoint in django.utils.log.AdminEmailHandler.emit(), and I can confirm that request.POST is empty.
But on the other hand, I'm sure that request.data was not empty in the ViewSet.

I verified that the request's Content-Type and X-Requested-With are correctly set.
The only non-standard middlewares I use are corsheaders and admin_reorder; I don't think they are related to this problem.

@danielmoessner
Copy link

@danielmoessner danielmoessner commented Jan 31, 2022

Any progress on this issue? I have the same problem.

@Hafnernuss
Copy link

@Hafnernuss Hafnernuss commented Mar 1, 2022

I can also confirm this issue, and it makes it a little bit hard to trace back errors

Here is a discussion related to this problem

@rvinzent
Copy link

@rvinzent rvinzent commented Apr 8, 2022

At this point I am convinced DRF is a dead project

@stale
Copy link

@stale stale bot commented Jun 12, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 12, 2022
@bblanchon
Copy link
Author

@bblanchon bblanchon commented Jun 12, 2022

I still think this is an important feature, please don't close this issue.

@stale stale bot removed the stale label Jun 12, 2022
@Hafnernuss
Copy link

@Hafnernuss Hafnernuss commented Jun 12, 2022

I agree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants