Skip to content

Error Codes

Nimi surfaces structured errors using stable reasonCode values.

ts
type NimiError = Error & {
  code: string
  reasonCode: string
  actionHint: string
  traceId: string
  retryable: boolean
  source: 'realm' | 'runtime' | 'sdk'
  details?: Record<string, unknown>
}

Developer guidance

  • Branch business logic by reasonCode, not by free-form message text.
  • Persist and expose traceId in logs and support channels.
  • Respect retryable for automatic retry policies.

Source references

Released under Apache-2.0 (runtime, sdk, proto) / MIT (desktop, nimi-mods, web) / CC-BY-4.0 (docs)