Console ↗

PermissionDeniedError

The authenticated caller lacks permission for the action. Check the active workspace and role.

Identification

Extends APIError. The status property contains the HTTP status returned by the server.

Handle in application code

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

Request rules and errors →