Skip to content

Errors

All errors are sentinel values checkable with errors.Is.

ErrorMeaning
orm.ErrNotFoundRecord/aggregate does not exist (within tenant/geo scope)
orm.ErrNoTenantContext without tenant (fail-closed)
orm.ErrUnknownTenantTenant ID not in the registry or archived
orm.ErrRequiredFieldrequired field not set at insert (zero value)
orm.ErrInvalidReferenceref target does not exist or belongs to another tenant
orm.ErrReferenceInUseDelete refused: record still referenced
orm.ErrInvalidValueValue outside the enum set
orm.ErrRequiresTxOperation (e.g. GetForUpdate) outside a transaction
orm.ErrTenantNotArchivedPurge on a non-archived tenant
orm.ErrTenantNotEmptyImport into an active tenant that still holds data
orm.ErrImportIncompleteTenant from an aborted import; stream without terminator
orm.ErrExportSchemaMismatchExport from a different schema state (without AllowSchemaDrift)
orm.ErrUnknownEventTypeEvent in the stream whose type is not declared here
orm.ErrNoGeoMulti-region topology but no data geo in context
orm.ErrRegionNotActiveData geo points at a bootstrapping/draining/unknown region
orm.ErrVersionConflictOptimistic locking: CRUD version or aggregate version stale
orm.ErrWaitTimeoutWaitFor deadline elapsed, projection lagged behind
orm.ErrSchemaDriftModels changed without a SchemaVersion bump
orm.ErrMigrationPendingOperation requires a completed migration
orm.ErrReadOnlyReplicaWrite access to a replica under WriteHomeOnly