index/interfaces/FailureView.md
A failure as a PLAIN OBJECT: the facts the SDKs' guards and classifiers (gswap-sdk's
classifyFailure) read, and nothing else. A real GalaSDKError is one (every field below is on
it, and on every product subclass); so is the wrapper an app makes from an SDK error to carry
through its own layers (an app's own failure class or error data), which
has a code and params but is not an instanceof anything the SDK owns. gswap-sdk's
classifyFailure, isRelayableRefusal, isUnprovenAcknowledgement, isUninterpretedAnswer,
isPreSendError, isShadowError, isNoMarket and mayHaveBeenQueued all accept such an
object wherever they accept an SDK error, and decide from the SAME fields in the same way, so an
app never has to keep the original error just to ask.
Only code is required. A field that is missing, or has the wrong type, reads as absent: a view
with no status is not a 404. Nothing here is text: the SDK never reads message of a view.
READ OR WRITE: a view is a WRITE's unless it says it is a read. This fails CLOSED on purpose:
a 5xx on a write may have been queued (unknown, no retry) and the same 5xx on a read changed
nothing (transient, retry), so a wrapper that drops its uniqueKey must never turn the first
into the second. A view is a read ONLY when it states write: false and has no uniqueKey;
GalaSDKError.write is already set that way for every SDK read. isWriteView
is the one definition.
APP ERRORS: a code the SDK catalog does not define is unknown (the SDK cannot say what
happened, and a wrong "failed" invites a duplicate), unless the view declares outcome.
classify failure gala sdk error is relayable refusal unproven acknowledgement uninterpreted answer pre send shadow no market may have been queued unique key
Properties
http error chain rejected not found gala sdk queued sent invalid input position stale amount side may have been signing failed pre send in flight post did queue final unique key