Skip to content
{% error %}
AutoXXS (320px)XS (375px)SM (640px)MD (768px)LG (1024px)XL (1280px)XXL (1536px)
SketchMaterialiOSTamagui
DataInjectionKeyPatternsServiceTransactionProcessResearchProductQualityPerformanceSpecDomainFunctionTechnologyArchitectureConfigMiddlewareDataDatabaseDrizzleMigrationModelop-sqliteSchemaSQLState ManagementDraftKeystoneMergePatchPatchesPersistenceReactiveRedoStoreUndoTestingDeviceFactoryIsolationTypeScriptZodTopicsCommunicationBidsNVCDesignDesign ImplicationsEducationPedagogyFoundationsPsychologyAttachmentFloodingRelatingAuthentic RelatingUIEditorReact Native

{% error %}

Attributes

Parameter Type Required Description
id string Unique kebab-case error id (e.g., 'bookmark-not-found')
code string Machine-readable SCREAMING_SNAKE_CASE code
category enum domain | technical — default is domain

Valid Parent Contexts

This tag is valid inside: {% api %}

Rules

Rule Force Realm Reference Description
error-code-screaming-snake must global Error codes must be in .
conventionnaming
error-id-descriptive should global Prefer descriptive noun phrases for IDs: ✓, ✗.
conventionnaming
error-body-condition should global The body should describe the failure condition, not how clients should handle it.
convention
error-category-technical-sparingly should global Use only when the technical condition is a core part of the business contract (e.g., a quota service).
convention

Declares a named domain error. Defined once per domain and referenced by operations via the throws tag.

Named error definition with code and category
tagerrorapi error-tag-definition
{% api %}
{% error id="bookmark-not-found" code="BOOKMARK_NOT_FOUND" category="domain" %}
Returned when the requested bookmark does not exist or belongs to a different user.
{% /error %}
{% /api %}