Skip to content

Add CodedError system with NATI-prefixed error codes#34

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

Add CodedError system with NATI-prefixed error codes#34
dadachi merged 2 commits intomainfrom
feature/coded-error-system

Conversation

@dadachi
Copy link
Copy Markdown
Contributor

@dadachi dadachi commented Apr 2, 2026

Summary

  • Add CodedError protocol with NATI-XXXX error codes (iOS prefix, NATA reserved for Android)
  • Create error types: AppError (NATI-1xxx), NativeAppTemplateAPIError (NATI-2xxx), NFCError (NATI-3xxx)
  • Add Error.codedDescription extension and Message.init(error:) convenience
  • Replace all error.localizedDescription with error.codedDescription across the entire codebase
  • Add unit tests for all error types and the codedDescription extension

Test plan

  • Verify make lint passes
  • Build in Xcode (Cmd+B)
  • Run all tests (Cmd+U)
  • Trigger an API error and verify [NATI-2001] prefix appears in the snackbar

🤖 Generated with Claude Code

dadachi and others added 2 commits April 2, 2026 14:42
Introduce CodedError protocol for structured, platform-distinguishable
error codes (NATI for iOS, NATA reserved for Android). Add error types:
AppError (NATI-1xxx), NativeAppTemplateAPIError (NATI-2xxx), NFCError
(NATI-3xxx). Replace all error.localizedDescription with codedDescription
across the codebase. Add unit tests and update test assertions.

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 f2d0368 into main Apr 2, 2026
2 checks passed
@dadachi dadachi deleted the feature/coded-error-system branch April 2, 2026 07:10
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