Skip to main content

Module codes

Expand description

What a Suotar per-item code means: the one place the wire vocabulary is spelled out. What may be done about the ledger error code it maps to is models’ classification::retryability.

Enums§

WireOutcome 🔒
What one code says about the row that carries it. Every view below narrows this.

Constants§

DUPLICATE_REQUEST_ITEM_CODE 🔒
Suotar’s answer for a later item of a batch that repeats an earlier one; it names the earlier item’s submission.
PERSON_NOT_FOUND_CODE 🔒
Suotar’s answer for a student number that names nobody.

Functions§

is_all_unavailable 🔒
Whether every item of an answer says the registry could not be reached. One good item makes it a plain answer, because something moved.
is_only_sisu_timeouts 🔒
Whether every item code of an answer says Sisu timed out: Suotar itself answered.
is_service_unavailable_code 🔒
Whether an item says the registry could not be reached right now. Suotar sends serviceTemporarilyUnavailable only for a whole request, so an item carrying it means its API changed, and is still worth backing off from. On import, sisuTimeout is what every item answers while Sisu is down.
is_sisu_timeout_code 🔒
Whether an import item says Sisu timed out: an answer from Suotar, not a failure of it.
is_waiting_item
Whether an error item’s code only says “not yet, check again later”, so the call log counts it as pending rather than as an error: submissionPending, verify’s notRegistered, and resolve’s enrolmentNotFound and enrolmentNotAccepted.
map_code 🔒
Suotar’s per-item code as a ledger error code, hardened for the endpoint it arrived on. None where the code names no failure to record.
outcome_of 🔒
wire_outcome hardened for the endpoint the code arrived on. Every caller that has an endpoint to name goes through here.
settled_state 🔒
The state a code settles a row in, or None where it settles nothing. On import, sent means Sisu has not answered yet.
wire_outcome 🔒
The contract’s own reading of a code, before any hardening of ours.