You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
to reproduce this issue, you can disconnect your newwork on your computer, then send anything as a question, you can see there is an endless loading icon in 1, while it's expected to directly inform the network has a problem in 2.
recently import { fetchEventSource} from "@microsoft/fetch-event-source";
has been included to handle the stream response returned from open api endpoint.
as I checked the official doc, https://github.com/Azure/fetch-event-source you can see it requires extra logic to handle if a response is not of type EventStreamContentType .
yanCode
changed the title
[Bug] fetchEventSource need logic to handle non-streaming events
[Bug] fetchEventSource need logic to handle non-streaming responses
May 17, 2023
to reproduce this issue, you can disconnect your newwork on your computer, then send anything as a question, you can see there is an endless loading icon in 1, while it's expected to directly inform the network has a problem in 2.

recently
import { fetchEventSource} from "@microsoft/fetch-event-source";
has been included to handle the stream response returned from
open api
endpoint.as I checked the official doc, https://github.com/Azure/fetch-event-source you can see it requires extra logic to handle if a response is not of type
EventStreamContentType
.as in
route.ts
we do we have logicreturning a non-streaming response.
I am preparing a PR now.
The text was updated successfully, but these errors were encountered: