Errors

Every error returns a code and a human readable message in a consistent envelope. This page lists every code swqos.com can return, what causes it, and what to do about it.


The shape#

Every failure, on both HTTPS and QUIC, uses the same envelope. Branch on code, which is stable, and show message to a human. Do not parse the message.

error
1{
2 "error": {
3 "code": "INSUFFICIENT_BALANCE",
4 "message": "insufficient prepaid balance"
5 }
6}

Every code#

HTTPCodeCauseFix
400INVALID_BASE64The transaction field is not valid base64.Base64-encode the serialized transaction, not the JSON or a hex string.
400INVALID_TRANSACTIONThe serialized envelope is malformed or out of bounds.Send a fully signed legacy or versioned transaction under 1232 bytes.
400INVALID_REQUESTA request field is missing or malformed.Check the JSON body shape against the reference.
401UNAUTHORIZEDNo Bearer credential was supplied.Send an Authorization header of the form 'Bearer <key>'.
401INVALID_API_KEYThe key could not be decoded.Check the key is intact and begins with usq_live_. Keys are secrets, so never log them.
402INSUFFICIENT_BALANCEThe account has no prepaid credit left.Deposit SOL from the dashboard. Credit appears once the deposit finalizes.
403ACCOUNT_DISABLEDThe account exists but is switched off.Contact support. This is usually a billing or abuse review.
409SUBMISSION_IN_PROGRESSThe same signature is already in flight.Wait for the first submission to return rather than retrying immediately.
503BILLING_UNAVAILABLEBilling persistence is unhealthy.Retry with backoff. Nothing was charged.
503AUDIT_UNAVAILABLEAudit persistence is unhealthy.Retry with backoff. Nothing was charged.
503UPSTREAM_UNAVAILABLEWe could not forward the transaction.Retry. Any charge for this submission is reversed automatically.

Register outcomes#

Your transaction register records an outcome for every submission, including ones that never reached the network. These are the values you will see.

OutcomeMeaning
acceptedCharged and acknowledged upstream.
duplicateAlready accepted within 90s. Not charged.
in_progressAn identical submission is still active.
invalid_transactionThe envelope failed validation. Not charged.
rejectedBlocked by account or billing policy. Not charged.
forward_failedUpstream did not accept it. The charge was reversed.
accepted means we forwarded your bytes and the upstream acknowledged the stream. It is not proof the transaction landed on chain. See billing for why that distinction is load bearing.

Which errors cost money#

Almost none of them. The full boundary is in billing, but in short:

  • Free: every 400, every 401, 402, 403 and 409. If we refuse a submission, you do not pay for it.
  • Charged then reversed: 503 UPSTREAM_UNAVAILABLE. The charge is written before we forward, so when forwarding fails we write a matching refund. It nets to zero.
  • Charged: only a successful submission. And it stays charged even if the transaction never lands, because forwarding is the thing you bought.

For retry guidance on each class of failure, see limits and behaviour.