UNPKG

@dotcms/types

Version:

The `@dotcms/types` package contains TypeScript type definitions for the dotCMS ecosystem. Use it to enable type safety and an enhanced developer experience when working with dotCMS APIs and structured content.

32 lines (31 loc) 992 B
import { DotHttpError } from '../client/public'; /** * Content API specific error class * Wraps HTTP errors and adds content-specific context including query information */ export declare class DotErrorContent extends Error { readonly httpError?: DotHttpError; readonly contentType: string; readonly operation: string; readonly query?: string; constructor(message: string, contentType: string, operation: string, httpError?: DotHttpError, query?: string); /** * Serializes the error to a plain object for logging or transmission */ toJSON(): { name: string; message: string; contentType: string; operation: string; httpError: { name: string; message: string; status: number; statusText: string; data: unknown; stack: string | undefined; } | undefined; query: string | undefined; stack: string | undefined; }; }