Skip to content
LogoLogo

Errors

ExceptionRaised whenAttributes
ArrektaErrorthe node or gateway returns an error (RFC 9457 application/problem+json)status, code, title, detail
TransportError (a ArrektaError)the request never got an HTTP answer (connection, timeout)detail
DecodeErrorbytes don't decode (transaction, PST, address, …)message
ValidationErrora local consensus or policy check failscode
ValueErroran amount string is malformed or has too many decimalsmessage

Branch on code; codes are stable and listed in the error code reference.

from arrekta_sdk import ArrektaError
 
try:
    client.send_transaction(tx=signed)
except ArrektaError as e:
    if e.code == "insufficient-fee":
        ...  # bump the fee
    else:
        raise

HTTP statuses: 400 bad encoding, 404 not found, 409 policy rejection, 422 consensus violation, 429 rate limited. See the error model.