Closed wojcikstefan closed 8 months ago
Note that this is a breaking change as unicode(exc)
no longer contains just a stringified json for validation errors. That said, we should encourage people to use exc.errors
and exc.field_errors
anyway.
@thomasst would you please do a quick review of this one?
I'm not aware of any. However, to introduce this breaking change in a mature way, I think we should bump the major part of this package's version after this is merged, and note in the release that one should use json.loads(exc.response.text)
from now on. Sounds good @philfreo @thomasst ?
and note in the release that one should use json.loads(exc.response.text)
No, they shouldn't have to JSON-parse the text property. There's already exc.errors
and exc.field_errors
for ValidationError
. Are there any other cases we should cover?
@eengoron is this something we still want to do? If no, feel free to close this PR. If yes, but there's a better way to do it, please close this PR and open a new issue/PR.
So that it's obvious at a glance what kind of an error we experienced. Right now it's possible to get an enigmatic traceback: