Skip to content

Commit

Permalink
Return http response errors as json
Browse files Browse the repository at this point in the history
Co-authored-by: Aarush Deshpande <[email protected]>
  • Loading branch information
hsna674 and JasonGrace2282 authored Sep 12, 2024
1 parent f92dcc8 commit be545e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tin/apps/users/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ def change_theme(request):
request.user.save()
return http.JsonResponse({"success": True})
else:
return http.JsonResponse({"success": False, "errors": form.errors}, status=400)
return http.JsonResponse({"success": False, "errors": form.errors.as_json()}, status=400)
raise http.Http404

0 comments on commit be545e5

Please sign in to comment.