feat: enhance error types for advanced pattern matching#277
Conversation
- Introduced RoutingError with Code field for errors.Is / errors.As - Updated Parse to return typed errors where possible - Closes Boxkit-Labs#273
|
@larryjay007 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
@codeZe-us, Ready for review again. Let me know if any adjustments are needed. |
|
@larryjay007 CI check still fails. |
|
Sorry for the back and forth, I really appreciate your patience and feedback helping me get it right. |
|
@larryjay007 check it properly, it still fails. You can join the contributor telegram group and let me know so I can review again. |
|
lets do this again. but already joined the telegram group. |
|
@larryjay007 all checks passed, but i noticed you withdrew from the task |
|
That must have been a mistake @codeZe-us .. |
|
Lets do it this way, lets see if i can reapply to this issue and get assigned. |
Overview
This PR improves error handling in the Go SDK by introducing typed routing errors that integrate with Go's standard
errors.Is()anderrors.As()APIs.Changes
packages/core-go/address/errors.goRoutingErrortype implementing theerrorinterface.Is()method to support code-based error matching.ErrorCodeconstants for common routing failures.packages/core-go/address/parse.goRoutingErrorinstances instead of generic errors where appropriate.Benefits
This enables more robust and idiomatic error handling, for example:
It also simplifies retry and fallback logic by allowing callers to distinguish between different failure scenarios using standard Go error matching.
Related Issue
Closes #273
Type of Change
Checklist