Skip to main content
A rater checks each request before it calculates. A request that breaks a rule gets a refusal in place of a premium. The refusal lists every broken rule it found. What rslc checks and guarantees explains why.

The refusal

rslc.PreparedRater.rate returns one JSON object. This refusal comes from the dwelling fire rater, for a Coverage A of 10 and a protection class of 11:
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:
  1. Shape. Each record, input and value has the declared kind, enum member, pattern and precision.
  2. Keys. Each keyed by key is unique, and each reference names an element of its list.
  3. Rules. Each where rule holds. The rater checks each record’s inputs in order, then the records inside it, then the record’s own rules.
One input reports at most one broken rule. A rule runs only when every value it reads passed the earlier passes. So each violation points to its own cause.

Size limits

A text cut short ends with …. When a limit cuts the refusal, truncated is true.

In each host

Both Python errors carry violations, truncated and refusal_json. BusinessRejection also carries the first rule’s code and message.