Console ↗

APIConnectionError

The fetch operation failed before a usable HTTP response arrived. Inspect the original cause and confirm that the configured origin is reachable.

Identification

Extends NgilaError. Inspect the error class when handling a rejected request.

Handle in application code

import {APIConnectionError} from "./ngila.mjs";
try {
  await client.models();
} catch (error) {
  if (!(error instanceof APIConnectionError)) throw error;
  console.error(error.name);
}

Request rules and errors →