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(
130130 # Extract token from header
131131 token_parts = auth_header .split (" " )
132132 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 )
134134 raise HTTPException (
135135 status_code = status .HTTP_401_UNAUTHORIZED ,
136136 detail = "Could not validate credentials" ,
@@ -149,7 +149,7 @@ def validate_token(
149149 audience = self .allowed_jwt_audiences ,
150150 )
151151 except (jwt .exceptions .InvalidTokenError , jwt .exceptions .DecodeError ) as e :
152- logger .exception ( f "InvalidTokenError: { e = } " )
152+ logger .error ( "InvalidTokenError: %r" , e )
153153 raise HTTPException (
154154 status_code = status .HTTP_401_UNAUTHORIZED ,
155155 detail = "Could not validate credentials" ,
You can’t perform that action at this time.
0 commit comments