# Raising a failure: `reject`

`reject` ends the callable with a declared failure:

```jadpo
action reserve(product: Product, requested: Quantity) fails QuantityUnavailable -> Reservation {
    if (requested > product.available) {
        reject QuantityUnavailable {
            available: product.available
            product_id: product.id
            requested: requested
        }
    }
    ...
}
```

The block after the failure's name gives every client and internal field
at once. A failure with no fields is rejected by its name alone. A
missing, unknown or repeated field is an error.

There is no `reject "text"` and no `throw`: every failure has a declared
type. `reject` can also be the result of a `match` arm
([Match](match.md)).

Two things can never go in a failure's fields: a secret setting
(`configuration.secret_flow`, see [Secrets](secrets.md)),
and the signed-in caller
([Who is calling](who-is-calling-current-principal.md)).
