-
Notifications
You must be signed in to change notification settings - Fork 73
refactor: propagate model errors via LSP response errors. #1124
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
Conversation
const backendError = err.cause | ||
// Send the backend error message directly to the client to be displayed in chat. | ||
return { | ||
return new ResponseError<ChatResult>(LSPErrorCodes.RequestFailed, err.cause.message, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will the error cause message be logged and then the other body be shown to the user?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, see the screenshot I added above. I was debating trying to parse the requestId and include it in the chat message (done on the agentic-chat vsc branch), but I think it makes more sense to be the logs since its a technical detail and only useful for internal users.
I think ideally we add a button to this chat message that opens the logs (like we do in most VSC error messages). However, this is not a p0 to me since it requires a decent amount of work to allow Flare to open IDE logs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense that we should be handling it this way, we just had to make a quick judgement call for the bug bash yesterday 😅
Thanks for the followup 👍 |
Should be safe to assume this is merged with client side changes with the version fixing setup, but want to double-check in case they get out of sync since this is fairly critical. Will take out of draft once I've verified. |
Verified these PRs can go in either order. Ideally client side first, but it doesn't break anything. I did notice a bug where thinking doesn't go away sometimes on the happy path, but this is also on main and is not related to this change. Here is the demo on main here, and hybrid chat latest VSC: thinkingBug.mov |
Problem
Solution
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.