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.
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.pywhere it waits after calling the facilitator.Implement a timeout mechanism to ensure slow agent responses don't cause bottlenecks.