Variant
header-error
This type enumerates the different kinds of errors that may occur when
setting or appending to a fields resource.
variant header-error {
invalid-syntax,
forbidden,
immutable,
size-exceeded,
other(option<string>),
}Cases
| Case | Payload | Description |
|---|---|---|
| invalid-syntax | — | This error indicates that a field-name or field-value was
syntactically invalid when used with an operation that sets headers in a
fields. |
| forbidden | — | This error indicates that a forbidden field-name was used when trying
to set a header in a fields. |
| immutable | — | This error indicates that the operation on the fields was not
permitted because the fields are immutable. |
| size-exceeded | — | This error indicates that the operation would exceed an
implementation-defined limit on field sizes. This may apply to
an individual field-value, a single field-name plus all its
values, or the total aggregate size of all fields. |
| other | option<string> | This is a catch-all error for anything that doesn't fit cleanly into a more specific case. Implementations can use this to extend the error type without breaking existing code. It also includes an optional string for an unstructured description of the error. Users should not depend on the string for diagnosing errors, as it's not required to be consistent between implementations. |