31
620hun
7y

Thanks Django for this very elaborate error message. It's not like I spent the last 3 hours trying to debug it or anything.

Comments
  • 1
    It doesn't say anything in stdout?
  • 5
    Three hours? But it says, clearly, "bad request"!
  • 2
    That is in the browser, I believe you should be looking at the request logs in the server.

    Also a 400 is typically your fault... 2 hours? Did you have lunch in that time too?
  • 1
    Aaand that error page can e customized with more data, and guess what.. it is your job to do so. Come on dude, effort.
  • 0
    @kyleperik "Body can't be parsed"
    @mundo03 That's what the browser received from the server. It's exactly the same thing in the server logs.

    I'm not sure what it was, but it's gone. I think it was due to manually setting Content-type on the request, although it was set to what the browser sets it to.
  • 2
    @mundo03 Also, Django normally shows very helpful error stacks. That's why this "something's wrong" type of error pissed me off.
  • 1
    And this kids, is why PHP is the preferred Back-End Language
  • 3
    Don't pay attention to @Skayo, kids.

    @620hun, take a look at the django documentation for debugging and error-reporting.

    https://docs.djangoproject.com/en/...
  • 1
    @620hun yeah that sounds right... it sounds like a post or some method send body with the wrong Content-Type and Django tried to automatically parse it
  • 0
    @620hun some demon passing through then :o
  • 2
    # settings.py:

    DEBUG = True
  • 0
    @Alireza6677 It was on

    @kyleperik Weird, because both the working and the not working requests had the same Content-type
Add Comment