ErrorsValues and types · rule
type.unknown_variant_field
Variant has no such field.
Area 2, Values and types; not declinable; the next step is usually the agent's.
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 }}
error PaymentOutcome.declined has no field note
--> main.jadpo:14:9
|14 | note: reason | ^^^^ not declared
- reason
PaymentOutcome.declined's fields arereason.- next
- Remove
note, or declare it onPaymentOutcome.declined(agent) - rule
- type.
unknown_ variant_ field - help
- https://jadpo.
dev/docs/errors/type. unknown_ variant_ field
Markdown for agents: /docs/errors/type.unknown_variant_field.md.Built from Jadpo main at aee2e8f.