UNPKG

matterbridge-roborock-vacuum-plugin

Version:
23 lines 926 B
/** * Base error class for all plugin errors. * Provides common error structure with error codes, status codes, and metadata. */ export declare abstract class BaseError extends Error { readonly code: string; readonly statusCode?: number | undefined; readonly metadata?: Record<string, unknown> | undefined; /** * Creates a new BaseError instance. * @param message - Human-readable error message * @param code - Error code for programmatic handling * @param statusCode - HTTP-like status code (optional) * @param metadata - Additional context information */ constructor(message: string, code: string, statusCode?: number | undefined, metadata?: Record<string, unknown> | undefined); /** * Serialize error to JSON for logging. * @returns Object representation of the error */ toJSON(): Record<string, unknown>; } //# sourceMappingURL=BaseError.d.ts.map