mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-02 11:30:12 +03:00
Explicitly raise exc in 'raise_uncaught_exception'
This commit is contained in:
parent
7310411533
commit
eca7632e05
|
@ -463,7 +463,7 @@ class APIView(View):
|
||||||
renderer_format = getattr(request.accepted_renderer, 'format')
|
renderer_format = getattr(request.accepted_renderer, 'format')
|
||||||
use_plaintext_traceback = renderer_format not in ('html', 'api', 'admin')
|
use_plaintext_traceback = renderer_format not in ('html', 'api', 'admin')
|
||||||
request.force_plaintext_errors(use_plaintext_traceback)
|
request.force_plaintext_errors(use_plaintext_traceback)
|
||||||
raise
|
raise exc
|
||||||
|
|
||||||
# Note: Views are made CSRF exempt from within `as_view` as to prevent
|
# Note: Views are made CSRF exempt from within `as_view` as to prevent
|
||||||
# accidental removal of this exemption in cases where `dispatch` needs to
|
# accidental removal of this exemption in cases where `dispatch` needs to
|
||||||
|
|
Loading…
Reference in New Issue
Block a user