mirror of
https://github.com/selfxyz/self.git
synced 2026-04-05 03:00:53 -04:00
* feat: add typed errors * docs: add jsdoc comments to error classes * docs: document sdk error helpers * pr feedback
12 lines
973 B
Markdown
12 lines
973 B
Markdown
# Error Classes
|
|
|
|
| Error Class | Category | Code | Description |
|
|
| --------------- | ------------ | -------------------- | ------------------------------------------------------------ |
|
|
| `NfcParseError` | `validation` | `SELF_ERR_NFC_PARSE` | Thrown when NFC byte streams are malformed or decoding fails |
|
|
| `MrzParseError` | `validation` | `SELF_ERR_MRZ_PARSE` | Raised for invalid MRZ characters or formats |
|
|
| `InitError` | `init` | `SELF_ERR_INIT` | Issues during SDK initialization |
|
|
| `LivenessError` | `liveness` | `SELF_ERR_LIVENESS` | Errors from liveness checks |
|
|
| `SdkError` | varies | custom | Base class for all SDK errors |
|
|
|
|
Use typed errors instead of generic `Error` to surface clearer failure modes and consistent categorization.
|