Unexpected result on the client when an exception is thrown in experimental_transform (streamText).
#8500
Replies: 1 comment
-
|
This discussion was automatically locked because it has not been updated in over 30 days. If you still have questions about this topic, please ask us at community.vercel.com/ai-sdk |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This might be a bug but I wanted to confirm that it's not just because of lack of understanding on my part.
When an error is thrown in
experimental_transform, the behavior on the server is as I would expect, it results in a 500 code:But the client actually receives a 200 response:
And the error provided by
useChatisTypeError: network error- which seems wrong, since the network is just fine.(Also:
onErrorisn't triggered inresult.toUIMessageStreamResponse.)Beta Was this translation helpful? Give feedback.
All reactions