-
Notifications
You must be signed in to change notification settings - Fork 243
feat: surface tool server errors in API and UI #420
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
base: main
Are you sure you want to change the base?
feat: surface tool server errors in API and UI #420
Conversation
- Add status.error field to tool server API response for reconciliation and other errors - Display error messages in the tool server card in the UI - Improves visibility of tool server issues for users Note: Need help testing error display in the UI
toolServerWithTools = append(toolServerWithTools, map[string]interface{}{ | ||
errorMsg := getErrorFromConditions(toolServer.Status.Conditions) | ||
if errorMsg != nil { | ||
log.Info("Tool server has error condition", "toolServerName", toolServer.Name, "error", *errorMsg) |
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.
This should be a debug
level log if anything. The information will already be returned by the handler.
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.
agreed... since the error is now surfaced in the API response, the log line has been updated to use the debug level instead of info. have updated
"conditions": toolServer.Status.Conditions, | ||
"error": errorMsg, |
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.
Why not just return the conditions and let the UI decide?
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.
good point... I added the error field to simplify error display in the UI, but can remove it and let the UI parse the conditions array instead. Let me know which approach you prefer.
- Updated InvokeHandler to use only GetTeamByID and InvokeTask, returning a consistent InvokeResponse. - Updated tests to match new handler logic, including error handling for GetTeamByID and InvokeTask. - Removed legacy tests for session and run creation errors, as these are no longer part of the handler flow. - Fixed all linter and build errors; all tests now pass.
@EItanya The additional updates I've made include several improvements to the tool server functionality:
this should ensure better type safety, more reliable error handling, and a more consistent API contract between the frontend and backend. |
I was trying to test it and create an MCP server (using the github one), but without providing the token. I see this in the controller logs:
Also, not sure how this was working previously, but if the mcp server doesn't exist/not found (e.g. "npx something-that-doesn'texist"), the status is never set on the resource. |
@peterj I need to unassign myself from this task. Just not enough time to continue contributing with my existing commitments. Feel free to update this branch or close PR as needed. |
Summary:
HandleListToolServers
in Go) to include astatus.error
field for each tool server, surfacing reconciliation and other errors from the controllerNote: @peterj I could use help testing error display in the UI. I wasn't able to add a tool server in localhost