All error codes

cleanup_required

HTTP 422Not retryable

A purchase step failed and automatic compensation did not fully clean up carrier inventory. The number is not active; support must reconcile.

How to resolve

  • Contact support with request_id and operation id. Do not reuse the same offer.

Example response

JSON

{
  "object": "error",
  "code": "cleanup_required",
  "message": "A purchase step failed and automatic compensation did not fully clean up carrier inventory. The number is not active; support must reconcile.",
  "request_id": "req_example123",
  "docs_url": "https://docs.statxt.com/api/errors/cleanup_required",
  "retryable": false,
  "recommended_action": "Contact support with the request_id and operation id. Do not retry the same offer."
}

SDK handling

TypeScript

import { StatxtClient, StatxtApiError } from "@statxt/sdk"

const client = new StatxtClient({ apiKey: process.env.STATXT_API_KEY! })

try {
  await client.messages.send({ ... })
} catch (err) {
  if (err instanceof StatxtApiError && err.code === "cleanup_required") {
    // A purchase step failed and automatic compensation did not fully clean up carrier inventory. The number is not active; support must reconcile.
    console.error(err.requestId) // include in support tickets
  }
}

Public reference: /docs/errors/cleanup_required