Add per-view custom exception handler support by ediskandarov · Pull Request #4753 · encode/django-rest-framework (original) (raw)
Description
It is possible to set custom exception handler using the EXCEPTION_HANDLER
setting key.
But it's hard to override exception handler on per-view basis.
To do this it's necessary to override rest_framework.view.APIView.handle_exception
method.
What is unreasonably complex.
This PR adds ability to easily override custom exception handler on view using rest_framework.view.APIView.get_exception_handler
method.