-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix(logs): surface handled errors as info in logs #3190
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
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
67c2efd to
4a17367
Compare
Greptile OverviewGreptile SummaryThis PR implements a system to distinguish between handled and unhandled errors in workflow executions, ensuring that errors caught by error handler paths (error ports) are logged as info-level rather than error-level. Key changes:
The implementation correctly propagates the Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Executor as Block Executor
participant Log as Block Log
participant TraceBuilder as Trace Spans Builder
participant Logger as Execution Logger
participant UI as Trace Spans UI
Executor->>Executor: Check hasErrorPort()
alt Has Error Port
Executor->>Log: Set errorHandled = true
Executor->>Executor: Return error output (don't throw)
else No Error Port
Executor->>Executor: Throw error
end
Log->>TraceBuilder: Build trace spans from logs
TraceBuilder->>TraceBuilder: Copy errorHandled to spans
TraceBuilder->>TraceBuilder: Propagate to iterations/containers
TraceBuilder->>TraceBuilder: Check for unhandled errors
alt Has Unhandled Errors
TraceBuilder->>TraceBuilder: Set workflow status = 'error'
else All Errors Handled
TraceBuilder->>TraceBuilder: Set workflow status = 'success'
end
TraceBuilder->>Logger: Pass trace spans
Logger->>Logger: checkSpanForErrors(errorHandled check)
alt Has Unhandled Errors
Logger->>Logger: Set level = 'error', status = 'failed'
else No Unhandled Errors
Logger->>Logger: Set level = 'info', status = 'completed'
end
TraceBuilder->>UI: Display spans
UI->>UI: hasUnhandledErrorInTree(span)
alt Root Workflow Span
UI->>UI: Use hasUnhandledErrorInTree()
else Other Spans
UI->>UI: Use hasErrorInTree()
end
UI->>UI: Apply error styling based on result
|
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.
11 files reviewed, 1 comment
...p/workspace/[workspaceId]/logs/components/log-details/components/trace-spans/trace-spans.tsx
Outdated
Show resolved
Hide resolved
|
@cursor review |
|
@greptile |
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.
11 files reviewed, no comments
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.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Summary
Type of Change
Testing
Tested manually
Checklist