Skip to content

[backend] No stack traces logged for error debugging #1

@athewsey

Description

@athewsey

When testing the agent locally (with uv run run.py), I'm not seeing useful stack traces when calls to /invocations error out: Just INFO: 127.0.0.1:50026 - "POST /invocations HTTP/1.1" 500 Internal Server Error

When Langfuse is configured correctly, I am seeing a little more information appear there - but not really enough to help track down errors especially when starting out. For example, when my LiteLLM gateway URL was mis-configured it just gave "Connection error." which was not particularly helpful.

At the moment I'm working around this with a temporary try/except block like this in main.py:

    @app.post("/invocations")
    async def invocations(request: dict, http_request: Request):
        try:
            ...
        except Exception:
            logger.exception("Oopsies!")
            raise

...But I think we should tweak the default logging config to make it a bit more debugging-friendly, especially when running locally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions