Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Catch stack unwinds in
/answer
endpoint (BloopAI#545)
* Catch unwind in answer API Due to the design of the `EventStream` web API, browsers will attempt to reconnect when a connection is closed. The bloop client has special logic to prevent this, but only when an error occurs in the stream, signalled by a serialized error, or when the `[DONE]` message is encountered. Previously, when the HTTP handler panicked, this would result in a logged message and a closed stream, as an error would fail to be transmitted. Now, we catch stack unwinds, and return an error to the client, so that we can ensure its error handling logic is triggered in order to display a proper error message, and to stop automatically reconnecting to the event stream endpoint. * remove tauri test --------- Co-authored-by: Gabriel Gordon-Hall <[email protected]>
- Loading branch information