Record

db-error

A structured error reported by the database itself.

record db-error {
  code: string,
  severity: string,
  message: string,
  detail: option​<string>,
  extras: list​<tuple​<string, string>>,
}

Fields

NameTypeDescription
codestringThe five-character SQLSTATE code, e.g. 23505 for a unique-constraint violation. See the Postgres "Error Codes" appendix.
severitystringThe severity as reported by the database, e.g. ERROR, FATAL, or PANIC.
messagestringThe primary human-readable error message.
detailoption​<string>An optional secondary message carrying more detail about the problem.
extraslist​<tuple​<string, string>>Any additional fields the database provided that are not captured above, as (field-name, value) pairs.