Better error.

This commit is contained in:
Itamar Turner-Trauring 2022-04-11 14:03:30 -04:00
parent 07049c2ac8
commit dfad50b1c2

View File

@ -86,8 +86,8 @@ def _authorization_decorator(required_secrets):
try:
secrets = _extract_secrets(authorization, required_secrets)
except ClientSecretsException:
request.setResponseCode(400)
return b""
request.setResponseCode(http.BAD_REQUEST)
return b"Missing required secrets"
return f(self, request, secrets, *args, **kwargs)
return route