-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to pass error messages from API to UI #409
Comments
All for it. The message (or chunks in case of streaming) that we are returning always have a role attached to them: ragna/ragna/deploy/_api/schemas.py Lines 54 to 57 in 3cef0f7
Currently Lines 223 to 227 in 3cef0f7
We could switch the role to Thoughts? |
It seems a little bit complicated/non-standard, but I would be okay with it. In practice, whenever I hit an error, it always comes from trying to generate the first chunk. If the first chunk is successful, then I don't remember hitting an error (although it's of course possible). This was the motivation for #410 - test the first chunk, and if there is an error then return a standard 500 response with details. I suspect that this will catch the vast majority of errors, and is what seemed to be recommended by others when I did a quick web-search. It might be useful for others who only consume the web API (ie don't use our UI) to have the ability to error before starting streaming. Happy for you to make a decision on how to proceed. |
Feature description
The ability to pass any error message that is raised in the API to the UI. Currently this is not possible as
StreamingResponse
is used which results inpeer closed connection without sending complete message body
being raised in the UI for all API errors.Value and/or benefit
Better user experience eg ability to determine more easily whether an issue is UI or API-related.
Anything else?
No response
The text was updated successfully, but these errors were encountered: