The refusal
rslc.PreparedRater.rate returns one result for each request, the value of this JSON. This refusal comes from the rater of the
example program effective://example-ca-ppa, for a vehicle 60 years old in rideshare use:
Example invalid-input response
Example invalid-input response
A vehicle
use of "racing" breaks only the enum rule, so the refusal is InvalidInputs:Example follow-up response
Example follow-up response
The shared renters example asks A request with
dog_has_bitten only of a household that has a dog:has_dog as true that leaves out dog_has_bitten breaks the follow-up rule:rate and for evaluate.
Each violation has six fields:
The JSON is compact, with sorted keys and numbers in exact decimal form.
Codes
A rule with its own code reports that code. Every other rule reports one of these:
A rule’s own code replaces the
INPUT code of a range, length or other rule. Type checks,
INPUT-KEY and INPUT-REF keep their own codes.
Order of the checks
The rater checks a request in three passes:- Shape. Each record, input and value has the declared kind, enum member, pattern and precision.
- Keys. Each
keyed bykey is unique, and each reference names an element of its list. - Rules. Each
whererule holds. The rater checks each record’s inputs in order, then the records inside it, then the record’s own rules.
Size limits
A text cut short ends with
…. When a limit cuts the refusal, truncated is true.
Runtime representations
Relativities reports one violation of a refusal in the columns
reason_code and reason.
For refused it is the first violation with a rule’s own code, and for invalid_inputs it is the first violation.
Results lists each field of these results, and the result for a fault.
Related
- RSL at a glance shows how to write each rule.
- Rate with missing answers reads a refusal for a partial request.