From dfad50b1c236aeac0c7944b636e81ef2c9855f67 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Mon, 11 Apr 2022 14:03:30 -0400 Subject: [PATCH] Better error. --- src/allmydata/storage/http_server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/allmydata/storage/http_server.py b/src/allmydata/storage/http_server.py index 4bf552fc5..3876409b0 100644 --- a/src/allmydata/storage/http_server.py +++ b/src/allmydata/storage/http_server.py @@ -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