Closed sideninja closed 3 months ago
This update enhances error handling in the models/errors/errors.go
file by replacing errors.Join
with fmt.Errorf
for clearer, more informative error messages. The changes improve context retention through error wrapping, allowing developers to trace the origin of issues more effectively. Specific errors have been updated to include additional messages, aiding in debugging and understanding error states.
File Path | Change Summary |
---|---|
models/errors/errors.go | Replaced errors.Join with fmt.Errorf for better error messages. Updated ErrInvalidTransaction , ErrInvalidRange , ErrOutOfRange , and functions like FailedTransaction , InvalidTransaction , and Recoverable to wrap errors with more context. |
🐇 In the meadow, errors hop,
With clearer messages, they'll stop!
Wrapping tales of why they bloom,
Debugging joy dispels the gloom.
Hooray for changes, bright and right,
Errors made clear, oh what a sight! 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Use different style of error wrapping since
errors.New
add\n
in the output which isn't friendly to a lot of outputs.Summary by CodeRabbit
New Features
Bug Fixes
ErrInvalidTransaction
,ErrInvalidRange
, andErrOutOfRange
to include additional informative messages.Documentation