# `failure.unknown_mapping`

Mapping names a condition the operation does not have.

Area 4, [Failures](../topics/failures.md); not declinable; the next step is usually the agent's.

A construction's arms are the rules of its type:

```jadpo
type Quantity = Int {
    min: 1
    max: 1000
}

type QuantityTooLarge = Failure {
    kind: FailureKind.invalid_value
}

function doubled(quantity: Quantity) fails QuantityTooLarge -> Quantity {
    var result: Quantity = attempt Quantity(quantity * 2) {
        maximum: QuantityTooLarge
    }
    return result
}
```

```text
error: `Quantity(...)` has no `maximum:` condition to map
 --> main.jadpo:12:9
   |
12 |         maximum: QuantityTooLarge
   |         ^^^^^^^ not a condition here
  reason: A construction's arms are the rules of its type and the types it builds on; `Quantity(...)`'s are `min` and `max`, and `invalid:` covers any without an arm of its own.
  next: Remove `maximum: ...`, or map one of `min` and `max` instead (agent)
  rule: failure.unknown_mapping
  help: https://jadpo.dev/docs/errors/failure.unknown_mapping

check failed: 1 error, 1 file
```
