Skip to content

Class: OpenCloudError

Defined in: src/errors.ts:5

Base error class for all Roblox Open Cloud API errors. Extends the native Error class with additional context about API failures.

Extends

  • Error

Extended by

Constructors

Constructor

ts
new OpenCloudError(
   message, 
   status?, 
   code?, 
   details?): OpenCloudError;

Defined in: src/errors.ts:14

Creates a new OpenCloudError instance.

Parameters

ParameterTypeDescription
messagestringHuman-readable error message
status?numberHTTP status code (e.g., 404, 500)
code?stringError code from the API (e.g., "RESOURCE_NOT_FOUND")
details?unknownAdditional error details from the API response

Returns

OpenCloudError

Overrides

ts
Error.constructor

Properties

status?

ts
optional status: number;

Defined in: src/errors.ts:16

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


code?

ts
optional code: string;

Defined in: src/errors.ts:17

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


details?

ts
optional details: unknown;

Defined in: src/errors.ts:18

Additional error details from the API response