Skip to content

Commit 6d766a7

Browse files
authored
Don't report API Keys as errors (#3438)
PBENCH-1168 Our API Key structure causes the primary OIDC key validation to fail with a `ValueError` exception. This isn't caught by the handler, and propagates to the caller's `except Exception` where it's reported as an error with traceback, which we don't want for a routine key validation. This just adds `ValueError` to the catch to avoid the annoying log message.
1 parent d336170 commit 6d766a7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/pbench/server/auth/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,5 +376,6 @@ def token_introspect(self, token: str) -> JSON:
376376
jwt.InvalidSignatureError,
377377
jwt.InvalidAudienceError,
378378
jwt.InvalidAlgorithmError,
379+
ValueError,
379380
) as exc:
380381
raise OpenIDTokenInvalid() from exc

0 commit comments

Comments
 (0)