Skip to content

Errors

An error looks like this. The HTTP status is still 200.

json
{ "id": "1", "success": false, "error": "Нет подключения с аппаратом!" }

Common errors

errorWhat it meansWhat to do
Нет подключения с аппаратом!The proxy cannot reach the deviceRetry once. If it repeats: check the device is on and its IP is correct.
Не так быстро, ожидайте окончания предыдущей команды!Another command is still runningWait for it to finish, then retry
Timeout выполнения команды, проверьте сетевые настройки!The device did not answer in timeDo not retry — see below
Timeout подключения к аппарату, проверьте сетевые настройки!Could not connect to the deviceCheck the device address
Invalid request IDA late answer from a previous commandCheck with PrintLastReceipt before retrying
not foundmethod is not send or pingFix your request
undefined or emptyNo connection to the deviceHandle it like Нет подключения с аппаратом!
OtherFmErrorA device error, see below

Everything else comes from the device itself and is passed through as-is.

OtherFmError

A general device error. Check in this order:

  1. The sums do not matchamount = sum of lines, totalAmount = amount − discountAmount, payments cover the total.
  2. The shift has been open over 24 hours — send CloseZReport.
  3. The device has no internet — it cannot reach the tax service.
  4. The date and time on the device are wrong.
  5. The device is stuck — turn it off and on.

Not an error envelope

SymptomMeaning
Connection refusedThe proxy is not running
TLS / certificate errorThe self_rootCA.crt certificate is not installed
HTTP 500, empty bodyYour JSON is broken, or id / method is missing
HTTP 404Wrong address — it must be POST /service

When you can retry

ErrorSafe to retry
Нет подключения с аппаратом!Yes
Не так быстро…Yes
Timeout подключения…Yes
Connection refused, TLS errorsYes
OtherFmError and other device errorsYes, after fixing the cause
Timeout выполнения команды…No — check first
Invalid request IDNo — check first

After a timeout

A timeout means the proxy stopped waiting. It does not mean the receipt was rejected — it may have been printed.

If you send the sale again, the customer gets two fiscal receipts.

1. Do not resend the Sale.
2. Send PrintLastReceipt.
3. Did your receipt come out?
   yes → it was printed, record it as done
   no  → send the Sale again

Example

js
const body = await post({ id: '1', method: 'send', data: { command, payload } })

if (body.success) {
  return body.data
}

const error = body.error || 'Unknown error'

// never reached the device — safe to retry
if (/Нет подключения|Не так быстро|Timeout подключения/.test(error)) {
  await sleep(3000)
  return retry()
}

// the receipt may exist — check before doing anything
if (/Timeout выполнения|Invalid request ID/.test(error)) {
  throw new Error('Check the device: ' + error)
}

throw new Error(error)

ARCA Proxy API