Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

give usefull informations when form validation fails + return 400 status code #8

Merged
merged 1 commit into from

2 participants

@Psycojoker

Right now djangbone return an http response with the code 200 + not usefull informations. This is a bit painful to debug.

Have a nice day,

@af af merged commit 42dc407 into from
@af
Owner
af commented

Thanks for the patch (and sorry for the delayed response). That method is only meant to be overridden but it seems like your changes will be good for debugging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  djangbone/views.py
View
2  djangbone/views.py
@@ -188,4 +188,4 @@ def validation_error_response(self, form_errors):
can override this method is you want to use a specific error response format.
By default, the output is a simple text response.
"""
- return HttpResponse('ERROR: validation failed')
+ return HttpResponse('<p>ERROR: validation failed</p>' + str(form_errors), status=400)
Something went wrong with that request. Please try again.