feat: enhance error formatting with wrapped errors - #6
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughUpdates adjust TrogonError string formatting: modified metadata and help sections, added optional wrapped error line, and refined debug/stack presentation. Tests were updated and expanded to validate new formatting and wrapping scenarios. Example and template outputs were trimmed of blank lines to match the revised format. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Caller
participant TE as TrogonError
participant F as Formatter
Caller->>TE: Error()
activate TE
TE->>F: build string
note right of F: Append domain, reason, message
F-->>TE: base header
alt has metadata
F-->>TE: "metadata:" + per-item lines
end
alt has help links
F-->>TE: blank line + links section
end
alt has wrapped error
F-->>TE: "wrapped error: " + wrapped message
end
alt has debug/stack
F-->>TE: newline + debug header, optional detail, stack entries
end
TE-->>Caller: final error string
deactivate TE
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (4)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
9a46529 to
0e50eda
Compare
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
0e50eda to
13c2f69
Compare
No description provided.