Skip to content

Commit 7959b22

Browse files
committed
Set status 400 on oauth exceptions
It's not always entirely correct, but it's less wrong than 200.
1 parent 252c238 commit 7959b22

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pgweb/account/oauthclient.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ def _oauth_login_dispatch(provider, request):
372372
try:
373373
return getattr(m, fn)(request)
374374
except OAuthException as e:
375-
return HttpResponse(e)
375+
return HttpResponse(e, status=400)
376376
except Exception as e:
377377
log.error('Exception during OAuth: {}'.format(e))
378378
return HttpResponse('An unhandled exception occurred during the authentication process')

0 commit comments

Comments
 (0)