Michael Richardson  committed 635bb01

Catch the FormValidationError exception and then access its form attribute.

  • Participants
  • Parent commits 4ce0f31

Comments (0)

Files changed (1)

File piston/

             result = meth(request, *args, **kwargs)
-        except FormValidationError, form:
+        except FormValidationError, e:
             # TODO: Use rc.BAD_REQUEST here
-            return HttpResponse("Bad Request: %s" % form.errors, status=400)
+            return HttpResponse("Bad Request: %s" % e.form.errors, status=400)
         except TypeError, e:
             result = rc.BAD_REQUEST
             hm = HandlerMethod(meth)