Skip to content

Servers propagate upstream errors without erroring #185

Description

@bxyu-nvidia

Use cases, pain points, and background
Errors are pretty hard to debug when they come in a sea of "this exception raised another exception" and INFO: 127.0.0.1:34960 - "POST /v1/responses HTTP/1.1" 500 Internal Server Error

Description:
We only error on the first error and everything downstream just propagates it without erroring again.

Design:
Add a generic middleware in Gym infra server utils that catches raise_for_status exceptions and simply returns the Error response as data without erroring.

Out of scope:

Acceptance Criteria:

  • Implementation of the above
  • Adhoc test this by raising some exception in a resources server and seeing if agent also errors or propagates it correctly.
  • Add tests for the above

Activity

  1. added
    usability
    core-infra
    on Oct 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    core-infrausability

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions