dispatchrun / dispatch

Entrypoint of the Dispatch ecosystem.
11 stars 1 forks source link

Don't fail when queue is empty #3

Closed Pryz closed 6 months ago

Pryz commented 6 months ago

When there is nothing in the bridge queue, the client will show a warning:

2024/04/11 21:34:06 WARN failed to contact Dispatch API (https://bridge.dev.dispatch.run): Get "https://bridge.dev.dispatch.run/sessions/099e4f53-db99-4c5b-a4e9-26e4f1fa3472": stream error: stream ID 1; INTERNAL_ERROR; received from peer

We should either move this warning behind a debug flag or handle it gracefully.

chriso commented 6 months ago

This indicates that the connection is being closed somewhere before the long polling CLI receives the expected 504 response from upstream. If a 504 response is received, the CLI will loop and try again without showing an error to the user. If the long polling request is closed before the 504 response is received, an error will be shown (as above).