> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arcane-powered.com/sdk/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors

> SdkError variants and stable string codes for Arcane ownership checks.

All ownership failures map to `SdkError`. Use `err.code()` for stable machine-readable codes (also prefixed in C ABI error buffers).

## Status vs error

Successful init / checks return `OwnershipStatus`:

| Value         | Meaning                                            |
| ------------- | -------------------------------------------------- |
| `Owned`       | Valid ticket for this portal public key and device |
| `DrmDisabled` | DRM is off for this title; no ticket required      |

## Error codes

| Code              | Variant          | Typical cause                                                 |
| ----------------- | ---------------- | ------------------------------------------------------------- |
| `ticket_missing`  | `TicketMissing`  | No ticket cache, or empty ticket while DRM is on              |
| `ticket_expired`  | `TicketExpired`  | JWT past `exp` (beyond skew)                                  |
| `ticket_invalid`  | `TicketInvalid`  | Bad JWT, JWKS, public key mismatch, `own=false`, corrupt file |
| `device_mismatch` | `DeviceMismatch` | Ticket / cache fingerprint ≠ this machine                     |
| `clock_rollback`  | `ClockRollback`  | System clock earlier than ticket or last-seen time            |
| `internal`        | `Io`             | Filesystem / path errors                                      |

## C ABI mapping

`arcane_sdk_init` and `arcane_check_ownership_offline` return:

| Return | Meaning                                                      |
| ------ | ------------------------------------------------------------ |
| `0`    | Success (`Owned` or `DrmDisabled`)                           |
| `1`    | Null / invalid public key argument                           |
| `2`    | `SdkError` — message written to `err_buf` as `code: message` |

```c theme={null}
char err[256];
if (arcane_sdk_init(PUBLIC_KEY, err, sizeof(err)) != 0) {
  /* e.g. "ticket_missing: …" */
}
```
