export declare const __errorUtilsLogger: import("./logger.js").Logger; /** * True when an error represents a WordPress REST permission denial (401/403), * e.g. requesting context=edit with credentials that lack edit capability. */ export declare function isPermissionError(error: unknown): boolean; export declare function getErrorMessage(error: unknown): string; export declare function isError(error: unknown): error is Error; export declare function logAndReturn(error: unknown, defaultValue: T): T; /** * Enhanced error handler for consistent tool error handling */ export declare function handleToolError(error: unknown, operation: string, context?: Record): never; /** * Rethrows a caught client error with an operation-specific message prefix (e.g. "Failed to * list media"), preserving statusCode/code/data/subclass-identity for WordPressAPIError (and * its subclasses AuthenticationError/RateLimitError/ValidationError) instead of flattening it * into a plain Error — ToolRegistry's auth-error detection and other callers depend on that * metadata surviving to the MCP tool boundary. Falls back to a plain Error only for inputs * that carry no such metadata to begin with. */ export declare function preserveToolError(prefix: string, error: unknown): never; /** * Validates required parameters */ export declare function validateRequired(params: Record | unknown, required: string[]): void; /** * Validates site parameter for multi-site configurations */ export declare function validateSite(site: string | undefined, availableSites: string[]): string; //# sourceMappingURL=error.d.ts.map