method.contract_fact_invalid
A contract fact is misplaced or invalid
| Type | https://mthds.ai/errors/method.contract_fact_invalid |
| Family | method: The method as written, the validation vocabulary included. |
| Domain | method: the method's author acts, by changing the method |
| Retry | no: repeating the operation fails the same way |
| HTTP status | 422 |
| Raised as | a problem document, sent as the body of an HTTP response or kept in a run's record |
What it means
A field, an input slot or a concept declares a contract fact, such as a bound, a length, a pattern, a format, a unit, an aggregate, examples or choice options, that does not apply where it is written or whose value breaks the language's rules for it.
What to do
Check the key against the contract facts the .mthds file format defines for the site's value class, then correct its value, move it to a field it applies to, or remove it.
Next steps
A problem carries the step aimed at whoever reads it: the first when its reader is the domain's actor, the method's author, and the second for any other reader.
| Reader | Kind | Detail |
|---|---|---|
| The domain's actor | change_method |
Correct or remove the contract fact '{fact}' at '{field_path}', then validate the method again. |
| Any other reader | contact_owner |
Ask the method's owner to correct the contract fact '{fact}' at '{field_path}'. |
Detail
The problem's detail is written from this template, filled with the occurrence's parameters:
The contract fact '
{fact}' at '{field_path}' is invalid (reason:{reason}).
Parameters
Every parameter is present on every occurrence of the code.
| Name | Type | Description |
|---|---|---|
fact |
identifier |
The key at fault, such as minimum, unit or choices. |
field_path |
identifier |
The key path of the field, input slot or concept that declares it. |
reason |
one of inapplicable, not_value_slot, malformed, contradictory, value_breaks_contract, duplicate_option |
Whether the key does not apply to its site's value class, sits on an input slot whose concept holds no plain value, has a value outside its rules, contradicts another fact of the site, is broken by an example or a default of the site, or gives an option table a value another option of its list holds, or a label another option carries. |
See also
- Contract facts
- Choice options
- Error Registry, which describes the members of this page
- Error Codes, every code of the core registry