Fix missing six.text_type() call on APIException.str by jleclanche · Pull Request #5476 · encode/django-rest-framework (original) (raw)
The call was added in 426547c
to allow for dict-style arguments to ValidationError but does not
apply to other APIException descendants.
It is possible to hit edge cases when printing an APIException in a
custom exception handler, that was passed a non-string as its first
argument (eg. AuthenticationError({"code": "foo", "detail": "bar"}))