Skip to content

PL-135522: log HTTPException errors at ERROR level before returning response#36

Merged
ctheune merged 4 commits into
mainfrom
PL-135522-log-manifest-unknown-models
Jun 22, 2026
Merged

PL-135522: log HTTPException errors at ERROR level before returning response#36
ctheune merged 4 commits into
mainfrom
PL-135522-log-manifest-unknown-models

Conversation

@elikoga

@elikoga elikoga commented Jun 17, 2026

Copy link
Copy Markdown
Member

PL-135522

Removing a model from inference but not the gateway makes the system 500 forever.

The update_manifest handler raises HTTPException(500) when the gateway requests models the inference server doesn't know about. FastAPI's built-in handler catches this before the custom @app.exception_handler(Exception) gets it, so the error detail was silently swallowed -- only visible in the bare status code in access.log.

Fix:

  • Add log.error() in manager.py before raising the HTTPException, including the unknown, requested, and configured model lists.
  • Add @app.exception_handler(HTTPException) in the inference app that logs any HTTPException with status >= 500 at ERROR level with the full detail, then returns the standard error response.

@ctheune ctheune force-pushed the PL-135522-log-manifest-unknown-models branch from afe1061 to 886f784 Compare June 22, 2026 08:57
@ctheune ctheune force-pushed the PL-135522-log-manifest-unknown-models branch from 886f784 to eb52b2e Compare June 22, 2026 08:57
Comment thread src/skvaider/inference/routers/manager.py Outdated
Comment thread src/skvaider/proxy/backends.py
@ctheune ctheune force-pushed the PL-135522-log-manifest-unknown-models branch from eb52b2e to 68c5294 Compare June 22, 2026 09:22
@ctheune ctheune merged commit abc806a into main Jun 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants