Skip to content

Implement CodedError system with NATA-XXXX error codes#23

Merged
dadachi merged 3 commits intomainfrom
feature/coded-error-system
Apr 2, 2026
Merged

Implement CodedError system with NATA-XXXX error codes#23
dadachi merged 3 commits intomainfrom
feature/coded-error-system

Conversation

@dadachi
Copy link
Copy Markdown
Contributor

@dadachi dadachi commented Apr 2, 2026

Summary

  • Add CodedError interface and sealed error hierarchies (AppError, NfcError, SubscriptionError) with NATA-prefixed error codes in common/errors/ package
  • Move ApiException from network/ to common/errors/ and make it implement CodedError (NATA-2001, NATA-2002)
  • Add Throwable.codedDescription extension and update all ViewModels to use it for user-facing error messages

Test plan

  • Run ./gradlew test — all unit tests pass (including new CodedErrorTest with 14 test cases)
  • Verify error messages in UI now include error codes (e.g., [NATA-2001] ...)
  • Verify no regressions in API error handling flows

🤖 Generated with Claude Code

dadachi and others added 3 commits April 2, 2026 18:01
Add platform-specific error codes (NATA prefix) for user-facing error
messages. Error types in common/errors/ package.

- Add CodedError interface, AppError, NfcError, SubscriptionError
- Make ApiException implement CodedError (NATA-2001, NATA-2002)
- Move error types to common/errors/ package
- Add Throwable.codedDescription extension
- Update all ViewModels to use codedDescription
- Add unit tests for all error types

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dadachi dadachi merged commit 1979992 into main Apr 2, 2026
1 check passed
@dadachi dadachi deleted the feature/coded-error-system branch April 2, 2026 09:35
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.

1 participant