AlmondTill/G3N API

Errors

Every refusal is a structured object in the response’s errors list. Its message is the refusal in plain words. Its extensions carries the code — major, minor and retryable — with detail when the refusal has more to say, and severity, why and next when the platform has words for the code. The response still carries extensions.at with its callId. major names the class, minor the code inside it, and retryable says whether what you asked for can still succeed.

The majors

MajorCodesMeaning
VALIDATION12The request itself is not acceptable.
AUTHN4Who is calling could not be established.
AUTHZ6The caller is known but not allowed.
NOT_FOUND9Nothing answers the reference given.
CONFLICT66The record’s state or a concurrent change refuses the call.
RATE_LIMIT2Too many calls in the window.
PAYMENT5The payment step did not go through.
FULFILLMENT1The fulfillment step did not complete.
TAX0A tax step could not be resolved.
FISCAL3The fiscal authority or provider refused or did not answer.
INTEGRATION3An outside service did not answer.
INTERNAL2The platform failed; nothing about the request caused it.

Retrying

When retryable is true, what you asked for can still succeed, after the thing the refusal names has changed. Each code’s “What to do” says what that is. A stale revision is one case: read the record again, then send the call with the new revision. When it is false, change something first: the values, the record’s state, or who is calling. The rule in full: Errors and retries.