The ARX specification

06 Errors

Every error an implementation raises is an **ARX exception** with a stable **code**: the same number and name in every provider and every language. The message starts with both (`ARX3001 UniqueViolation: …`). The **category** is the code's thousands digit. A provider keeps the database's own error on the exception (its native code, and the driver's error as the inner exception) but never puts values into its own messages.

Category Thousands Meaning
Validation 1 Refused before the database: invalid input, a misused transaction or scope, a suspected injection
NotFound 2 The record a call needed isn't there, there are several, or it changed since it was read (ARX2004)
Constraint 3 The database refused the data: unique key, foreign key, not null, check, an error a routine raised
Data 4 A value the column can't hold
Schema 5 A table or column that doesn't exist, or doesn't match the catalog
Permission 6 The database user may not do it
Transient 7 Retrying may succeed: deadlock, serialization failure, timeout, throttling, a lost connection
NotSupported 8 The provider can't do it (chapter 08)
Provider 9 Anything else the database said

Retry only when IsTransient is true: every Transient code is, and a provider may mark another error transient when its database says so (DynamoDB's transaction conflicts). Every code, with its category and transient default, is in vectors/error-codes.json; an implementation must have exactly these codes.

Language-specific exception types group the categories: in .NET ArxValidationException (1), ArxDatabaseException (2–7, 9) and ArxNotSupportedException (8), all ArxException.

All chapters of the specification