# `type.unknown_variant_field`

Variant has no such field.

Area 2, [Values and types](../topics/values-and-types.md); not declinable; the next step is usually the agent's.

```jadpo
type DeclineReason = Text {
    max_length: 200
}

type PaymentOutcome = Enum {
    declined: {
        reason: DeclineReason
    }
}

function declined_payment(reason: DeclineReason) -> PaymentOutcome {
    return PaymentOutcome.declined {
        reason: reason
        note: reason
    }
}
```

```text
error: `PaymentOutcome.declined` has no field `note`
 --> main.jadpo:14:9
   |
14 |         note: reason
   |         ^^^^ not declared
  reason: `PaymentOutcome.declined`'s fields are `reason`.
  next: Remove `note`, or declare it on `PaymentOutcome.declined` (agent)
  rule: type.unknown_variant_field
  help: https://jadpo.dev/docs/errors/type.unknown_variant_field

check failed: 1 error, 1 file
```
