Mintplex-Labs/anything-llm · error · Error

Catalog request failed with status ${response.status}

Error message

Catalog request failed with status ${response.status}

What it means

Thrown by the Foundry catalog fetcher when the POST to the Azure ML model registry catalog endpoint returns a non-2xx HTTP status. This endpoint is unauthenticated (gated only on User-Agent) and paginates available on-device Foundry models. A failure here prevents the catalog from being populated, blocking model discovery for the Foundry/LocalAI provider. The HTTP status code is embedded in the message.

Source

Thrown at server/utils/AiProviders/foundry/catalog.js:177

          filters: [
            { field: "type", operator: "eq", values: ["models"] },
            { field: "kind", operator: "eq", values: ["Versioned"] },
            { field: "labels", operator: "eq", values: ["latest"] },
            {
              field: "properties/variantInfo/variantMetadata/executionProvider",
              operator: "eq",
              values: this.EXECUTION_PROVIDERS,
            },
          ],
          pageSize: this.PAGE_SIZE,
          skip: null,
          continuationToken,
        },
      }),
    });

    if (!response.ok)
      throw new Error(`Catalog request failed with status ${response.status}`);
    const body = await response.json();
    const page = body?.indexEntitiesResponse ?? {};
    return {
      value: Array.isArray(page.value) ? page.value : [],
      continuationToken: page.continuationToken ?? null,
    };
  }

  /**
   * @typedef {Object} CatalogVariant
   * @property {string} name - Matches the id the daemon reports, eg `qwen3-0.6b-generic-gpu`.
   * @property {'CPU'|'GPU'|'NPU'} deviceType
   * @property {string|null} executionProvider
   * @property {number} sizeMb
   *
   * @typedef {Object} CatalogModel
   * @property {string} alias
   * @property {string} task

View on GitHub (pinned to 526360e320)

Solutions

  1. Check the embedded HTTP status code in the error message to classify the failure (4xx = client/config, 5xx = Azure-side).
  2. Verify network connectivity to the Azure ML registry endpoint from the host.
  3. If behind a proxy, ensure it allows the POST with the 'AzureAiStudio' User-Agent header.
  4. For 429, reduce catalog refresh frequency and retry with backoff.
  5. If the endpoint URL changed, update the CATALOG_URL constant to the current Azure registry endpoint.
Defensive patterns

Strategy: retry

Validate before calling

// Pre-check reachability of the Azure ML registry catalog before paginating
const probe = await fetch(Catalog.CATALOG_URL, {
  method: 'POST',
  headers: { 'User-Agent': 'AzureAiStudio', 'Content-Type': 'application/json' },
  signal: AbortSignal.timeout(5000),
  body: JSON.stringify({ resourceIds: [{ resourceId: 'azureml', entityContainerType: 'Registry' }], indexEntitiesRequest: { filters: [], pageSize: 1, skip: null, continuationToken: null } }),
}).catch(() => null);
if (!probe || !probe.ok) throw new Error('Azure ML catalog endpoint is unreachable');

Try / catch

for (let attempt = 1; attempt <= 3; attempt++) {
  try {
    return await Catalog.#fetchPage(continuationToken);
  } catch (e) {
    if (/Catalog request failed with status 5\d{2}/.test(e.message) || /status 429/.test(e.message)) {
      await sleep(1000 * attempt);
      continue;
    }
    throw e;
  }
}

Prevention

When it happens

Trigger: The Azure ML registry endpoint is temporarily unavailable (502/503); the request times out (AbortSignal.timeout fires, though that throws a different AbortError); the registry API changed its URL or contract (404/400); a corporate proxy blocks or modifies the request; Azure returns 429 for excessive catalog polling.

Common situations: Air-gapped or proxied environments where the Azure registry is unreachable; the User-Agent header 'AzureAiStudio' being stripped by a middleware; Azure transient outages; the CATALOG_URL constant pointing to a deprecated endpoint after an Azure backend migration.

Related errors


AI-assisted analysis of Mintplex-Labs/anything-llm@526360e320 (2026-08-13). Data as JSON: /api/errors/12c987693191dfd7. Report an issue: GitHub.