Skip to content

Class: AuthError

Defined in: src/errors.ts:57

Error thrown when authentication fails or credentials are invalid. This typically indicates an invalid or missing API key.

Extends

Constructors

Constructor

ts
new AuthError(
   message, 
   status, 
   details?): AuthError;

Defined in: src/errors.ts:65

Creates a new AuthError instance.

Parameters

ParameterTypeDefault valueDescription
messagestring"Unauthorized: invalid or missing Open Cloud credentials"Error message (defaults to a helpful authentication error message)
statusnumber401HTTP status code (401 or 403)
details?unknownundefinedAdditional error details from the API response

Returns

AuthError

Overrides

OpenCloudError.constructor

Properties

status?

ts
optional status: number;

Defined in: src/errors.ts:16

HTTP status code (e.g., 404, 500)

Inherited from

OpenCloudError.status


code?

ts
optional code: string;

Defined in: src/errors.ts:17

Error code from the API (e.g., "RESOURCE_NOT_FOUND")

Inherited from

OpenCloudError.code


details?

ts
optional details: unknown;

Defined in: src/errors.ts:18

Additional error details from the API response

Inherited from

OpenCloudError.details