Skip to content

feat: Add timeout logic to the x402 middleware #3

@arun-fairfetch

Description

@arun-fairfetch

In payments/x402.py, the middleware gates requests on payment. We need to ensure that if an agent hits a 402 challenge but fails to provide a proof or wallet token, the request doesn't hang the server resources during the handshake.

Task:

Locate the logic in payments/x402.py where it waits after calling the facilitator.

Implement a timeout mechanism to ensure slow agent responses don't cause bottlenecks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions