Skip to content

Failure reasons

An action's <failure_reasons> declares named failures the target can return.

<failure_reasons>
  <failure_reason name="unavailable"/>
</failure_reasons>

Each failure_reason name should match the reason returned by the service. Frontend-targeted actions must declare an empty list; the compiler rejects named failure reasons on a frontend target. For HTTP actions, an empty <failure_reasons/> means no named failures are declared; it does not guarantee success or mean that the runtime rejects failure responses.

Failure reasons apply to Service Interface actions, not to the ontology or domain validator. See Actions.