Topic

Errors

Every failure is a TentError, which is exported from tentjs. A query or a change throws it, and a failed action refuses its promise with it.

MemberHolds
codeFor the framework, T and four digits, as T0002. For an error of an app's own, the builder's word
nameThe short word of the code, as bad-input. For an error of an app's own, the builder's word again
messageWhat went wrong, in words
fixWhat to do about it, where that can be said
where{ file, line, definition }: the place in the project, where there is one
fieldsFor each field that failed, by its dotted name, what it failed. An entry of a list is named by its number, as lines.0.qty
TypeScript
import { TentError } from 'tentjs'

try {
  await refund({ order })
} catch (error) {
  if (error instanceof TentError && error.code === 'T2103') {
    // the order is not there
  }
}

Every code of the framework has a page: tent docs T0002.

What the build and the check report is a finding: the same members, with level, which is 'error', 'warning' or 'note', and docs, the command that explains its code.

Tent.js