-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StaticHTMLRenderer cannot handle ValidationError #9209
Comments
This was referenced Jan 5, 2024
@auvipy yes, it does. Running locally with that patch applied the test I wrote above succeeds. I belive that the test should be added before merging, to avoid regression. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Checklist
Description
If any
ValidationError
is raised in a view which is going to useStaticHTMLRenderer
then it will cause an error resulting in an Internal-Server-Error because the base classTemplateHTMLRenderer
expectes to handle with adict
while in this case it receives alist
instead.django-rest-framework/rest_framework/renderers.py
Lines 171 to 175 in 0f39e01
Code sample
Stacktrace
TypeError: list indices must be integers or slices, not str
The text was updated successfully, but these errors were encountered: