Skip to content

Conversation

stevenou
Copy link

@stevenou stevenou commented May 9, 2025

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?

So I based this off of #480 which seems like it might be abandoned at this point. I copy-pasted the spec minus a minor fix for splitting the json into 2 chunks (it was missing a character in the 2nd chunk).

The approach taken here assumes the error is parsable json. We accumulate the chunks until the message is parsable, then we raise an error. I don't really know enough about SSE/streaming to know whether this is definitely a bad idea but none of the existing specs broke so I'm hoping it's acceptable.

Not sure what would happen if, let's say, the stream disconnects midway so we never get the completed error message. I'm guessing in that case a different type of error (related to connection/streaming) will surface instead of the original error, which is probably ok?

Or if the error is never parsable - then possibly the whole thing fails silently?

Let me know your thoughts please.

Sorry, something went wrong.

stevenou added 3 commits May 9, 2025 11:15

Unverified

This user has not yet uploaded their public signing key.

Unverified

This user has not yet uploaded their public signing key.

Unverified

This user has not yet uploaded their public signing key.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant