keep/api/api.py catch_exception formats request.state.trace_id and request.state.tenant_id while handling an exception. Starlette State.__getattr__ raises AttributeError when either attribute is absent, so the handler fails and the original exception is discarded.
The same body is on v0.53.0 and current main. Fix: getattr for both attributes and logger.exception, keeping the JSON 500 shape {message, trace_id, error_msg}.
PR: #6854
This is not #6089 or #6100; those are different tenantId surfaces.
keep/api/api.pycatch_exceptionformatsrequest.state.trace_idandrequest.state.tenant_idwhile handling an exception. StarletteState.__getattr__raisesAttributeErrorwhen either attribute is absent, so the handler fails and the original exception is discarded.The same body is on
v0.53.0and currentmain. Fix:getattrfor both attributes andlogger.exception, keeping the JSON 500 shape{message, trace_id, error_msg}.PR: #6854
This is not #6089 or #6100; those are different tenantId surfaces.