This adds an except clause to explicitly ignore an expired OIDC token: it was being reported with a stack trace, which is disruptive and unnecessary as it's a normal and expected periodic event. (Tokens are supposed to expire, and can be refreshed by the client.)
Also, to make it easier to attach the server's client API error WARNING messages to the associated NGINX messages, report the HTTP status.
We'll now see client API errors reported like this:
Upload client error 400: 'File extension not supported, must be .tar.xz'
I nearly made a similar change to the server internal error before deciding it would be redundant (and broke caplog fixture tests which weren't worth changing), but in tracking down the initial attempt I found some lint warnings about redeclaring json, corrected a weird attempt to verify a faked internal server error log message, and fixed some internal server
error f-strings.
PBENCH-1303
This adds an
except
clause to explicitly ignore an expired OIDC token: it was being reported with a stack trace, which is disruptive and unnecessary as it's a normal and expected periodic event. (Tokens are supposed to expire, and can be refreshed by the client.)Also, to make it easier to attach the server's client API error
WARNING
messages to the associated NGINX messages, report the HTTP status.We'll now see client API errors reported like this:
I nearly made a similar change to the server internal error before deciding it would be redundant (and broke
caplog
fixture tests which weren't worth changing), but in tracking down the initial attempt I found some lint warnings about redeclaringjson
, corrected a weird attempt to verify a faked internal server error log message, and fixed some internal server error f-strings.