File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/stac_auth_proxy/middleware Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ def validate_token(
130
130
# Extract token from header
131
131
token_parts = auth_header .split (" " )
132
132
if len (token_parts ) != 2 or token_parts [0 ].lower () != "bearer" :
133
- logger .error (f "Invalid token: { auth_header } " )
133
+ logger .error ("Invalid token: %r" , auth_header )
134
134
raise HTTPException (
135
135
status_code = status .HTTP_401_UNAUTHORIZED ,
136
136
detail = "Could not validate credentials" ,
@@ -149,7 +149,7 @@ def validate_token(
149
149
audience = self .allowed_jwt_audiences ,
150
150
)
151
151
except (jwt .exceptions .InvalidTokenError , jwt .exceptions .DecodeError ) as e :
152
- logger .exception ( f "InvalidTokenError: { e = } " )
152
+ logger .error ( "InvalidTokenError: %r" , e )
153
153
raise HTTPException (
154
154
status_code = status .HTTP_401_UNAUTHORIZED ,
155
155
detail = "Could not validate credentials" ,
You can’t perform that action at this time.
0 commit comments