- Notifications
You must be signed in to change notification settings - Fork715
fix: fixed traces error handling#8236
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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.
Greptile Summary
This PR fixes error handling issues in the traces page (web/src/plugins/traces/Index.vue) by addressing template interpolation problems and improving error message extraction from API responses. The changes focus on three main areas:
Template Fix: Added conditional rendering in the HTML template to prevent "undefined" from appearing in error messages by checking if
errorDetailexists before interpolating itState Initialization: Properly initializes both
errorMsganderrorDetailto empty strings to ensure they have defined valuesRobust Error Parsing: Enhanced the error handling logic to accommodate different API response structures that the backend might return, checking for
error,message, anderror_detailfields in various response formats
This change aligns with the existing error handling patterns seen in the logs composable (from the provided context), where similar defensive programming techniques are used to extract trace IDs and error messages from different response structures. The traces page needed similar robustness to handle the variety of error response formats that can come from the backend services.
Confidence score: 4/5
- This PR is safe to merge with minimal risk as it only improves error handling without changing core functionality
- Score reflects straightforward defensive programming improvements that prevent UI display issues
- No files require special attention as the changes are localized and follow established patterns
1 file reviewed, no comments
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
7f088db to597f921Compare597f921 to0b7533cCompare424502c intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
PR Type
Bug fix
Description
Prevent undefined error messages in traces UI
Safely build HTML for error details
Reset error detail before each query
Robust parsing of backend error responses
Diagram Walkthrough
File Walkthrough
Index.vue
Harden traces error handling and renderingweb/src/plugins/traces/Index.vue
errorDetailbefore each query run.error,message, andcode.errorDetailfromerror_detailwhen available.