add 401 to short exception list

This commit is contained in:
Vladimir Mandic
2024-01-11 12:28:50 -05:00
parent a37ec265a0
commit d35f189c41
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ def setup_middleware(app: FastAPI, cmd_opts):
log.error(f"API error: {req.method}: {req.url} {err}")
if not isinstance(e, HTTPException) and err['error'] != 'TypeError': # do not print backtrace on known httpexceptions
errors.display(e, 'HTTP API', [anyio, fastapi, uvicorn, starlette])
elif err['code'] == 404:
elif err['code'] == 404 or err['code'] == 401:
pass
else:
log.debug(e, exc_info=True) # print stack trace
+1 -1
Submodule wiki updated: a0c7ddbc9a...c47ef6e70c