Home / Rule codes
Rule codes
Each entry of a problem's errors array names the rule its value broke with a code. The shared codes are used by every service; a service may add codes of its own for rules only it has. Like problem codes, they are closed sets a client may branch on.
Shared
- incompatible
- A value that does not go with another value of the same request; the entry points at the one to change.
- invalid
- A value has the wrong form: it does not match the pattern or format the rule requires.
- off_step
- A number lies between the steps the value may take (a whole number where a fraction was given, a multiple of a step).
- out_of_range
- A number lies outside minimum..maximum; either bound may be absent when the range is open on that side.
- required
- No value was given where the rule needs one.
- too_few
- A list has fewer items than minimum requires.
- too_long
- A text has more characters than maximum allows.
- too_many
- A list has more items than maximum allows.
- too_short
- A text has fewer characters than minimum requires.
- A value that is taken by someone else or not offered here.
- unknown
- A name, id or member the service does not have: a reference to something that does not exist or is not visible to the caller.
- unreadable
- A value that could not be read as its type (text where a number belongs). Written for developers: a correct client never sends it.
homematch
- contradicts_identity_check
- The date of birth says the person was an adult on a day when a document in an earlier identity check showed them under 18. The date and the document disagree, which does not mean the person is too young: the document may have been misread. Show the person the problem's detail, which tells them whether they can repeat the identity check.
- not_in_switzerland
- The address or place in the value cannot be placed in a Swiss municipality. Homematch lists Swiss homes only, so an address abroad, or one that matches no Swiss postal code and town, is refused. Correct the address or postal code and send the request again.
- not_ready
- The media item the value refers to, such as a photo or video of a listing, is still being processed and cannot be published yet. Nothing is wrong with the request itself. Wait until processing finishes, then send the same request again.
- processing_failed
- Processing of the media item the value refers to, such as a photo, video or document of a listing, failed, so it cannot be published. Waiting does not help. Remove the item or upload it again, then resend the request.
- review_required
- The part of the listing the value points to must be reviewed before it can be published, for example a listing being republished after it was withdrawn for some time. Review the listing in its current revision, then publish it again.
- underage
- The date of birth makes the person younger than 18, and Homematch accounts are for adults. Correct the date if it was mistyped; otherwise the request cannot succeed and should not be retried unchanged.