UNPKG

studiocms

Version:

Astro Native CMS for AstroDB. Built from the ground up by the Astro community.

37 lines (36 loc) 1.54 kB
import { StudioCMSError } from '../../errors.js'; /** * Represents an error specific to the StudioCMS SDK. * This class extends the `StudioCMSError` class to provide additional context * and functionality for errors occurring within the StudioCMS SDK. * * @extends {AstroError} */ export declare class StudioCMS_SDK_Error extends StudioCMSError { name: string; } declare const SDKCoreError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & { readonly _tag: "studiocms/sdk/errors/SDKCoreError"; } & Readonly<A>; /** * Represents a core error in the StudioCMS SDK. * * This error class is tagged with `'studiocms/sdk/errors/SDKCoreError'` and contains * additional metadata about the error type and its cause. * * @template T - The error metadata, including: * - `type`: The type of error, either `'UNKNOWN'` or `'LibSQLDatabaseError'`. * - `cause`: The underlying {@link StudioCMS_SDK_Error} that triggered this error. * * @remarks * - The `toString()` method returns a string representation of the error, including the cause's message. * - The `message` getter exposes the message from the underlying cause. */ export declare class SDKCoreError extends SDKCoreError_base<{ readonly type: 'UNKNOWN' | 'LibSQLDatabaseError'; readonly cause: StudioCMS_SDK_Error; }> { toString(): string; get message(): string; } export {};