All error codes

instructions_invalid

HTTP 400Not retryable

The inline call instructions aren't valid Statxt call instructions (bad XML, an unknown verb or attribute, or a value out of range).

Example response

JSON

{
  "object": "error",
  "code": "instructions_invalid",
  "message": "The inline call instructions aren't valid Statxt call instructions (bad XML, an unknown verb or attribute, or a value out of range).",
  "request_id": "req_example123",
  "docs_url": "https://docs.statxt.com/api/errors/instructions_invalid",
  "retryable": false,
  "recommended_action": "Fix the instructions as the message describes, then retry."
}

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 === "instructions_invalid") {
    // The inline call instructions aren't valid Statxt call instructions (bad XML, an unknown verb or attribute, or a value out of range).
    console.error(err.requestId) // include in support tickets
  }
}

Public reference: /docs/errors/instructions_invalid