Skip to content

feat: enhance error types for advanced pattern matching#277

Merged
codeZe-us merged 5 commits into
Boxkit-Labs:mainfrom
larryjay007:feat/enhance-error-types
Jun 29, 2026
Merged

feat: enhance error types for advanced pattern matching#277
codeZe-us merged 5 commits into
Boxkit-Labs:mainfrom
larryjay007:feat/enhance-error-types

Conversation

@larryjay007

Copy link
Copy Markdown
Contributor

Overview

This PR improves error handling in the Go SDK by introducing typed routing errors that integrate with Go's standard errors.Is() and errors.As() APIs.

Changes

packages/core-go/address/errors.go

  • Added a new RoutingError type implementing the error interface.
  • Implemented an Is() method to support code-based error matching.
  • Introduced specific ErrorCode constants for common routing failures.

packages/core-go/address/parse.go

  • Updated parsing logic to return RoutingError instances instead of generic errors where appropriate.

Benefits

This enables more robust and idiomatic error handling, for example:

if errors.Is(err, address.ErrInvalidChecksumError) {
    // Handle invalid checksum
}

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

  • Enhancement

Checklist

  • Code follows the project's style guidelines
  • Self-review completed
  • Changes verified locally
  • Tests pass (where applicable)

- Introduced RoutingError with Code field for errors.Is / errors.As
- Updated Parse to return typed errors where possible
- Closes Boxkit-Labs#273
@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

@codeZe-us
codeZe-us self-requested a review June 28, 2026 13:29

@codeZe-us codeZe-us left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@larryjay007 Fix CI workflow issues

@larryjay007

Copy link
Copy Markdown
Contributor Author

@codeZe-us, Ready for review again. Let me know if any adjustments are needed.
Thanks!

@codeZe-us

Copy link
Copy Markdown
Contributor

@larryjay007 CI check still fails.

@larryjay007

Copy link
Copy Markdown
Contributor Author

Sorry for the back and forth, I really appreciate your patience and feedback helping me get it right.
Ready for another look whenever convenient.

@codeZe-us

Copy link
Copy Markdown
Contributor

@larryjay007 check it properly, it still fails. You can join the contributor telegram group and let me know so I can review again.

@larryjay007

Copy link
Copy Markdown
Contributor Author

lets do this again. but already joined the telegram group.

@codeZe-us

Copy link
Copy Markdown
Contributor

@larryjay007 all checks passed, but i noticed you withdrew from the task

@larryjay007

Copy link
Copy Markdown
Contributor Author

That must have been a mistake @codeZe-us ..

@larryjay007

Copy link
Copy Markdown
Contributor Author

Lets do it this way, lets see if i can reapply to this issue and get assigned.

@codeZe-us
codeZe-us self-requested a review June 29, 2026 09:37
@codeZe-us
codeZe-us merged commit 992dd83 into Boxkit-Labs:main Jun 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhance Go Error Types for Advanced Pattern Matching

2 participants