UNPKG

insite-mcp

Version:

MCP server for browser automation with 52 tools using Playwright

29 lines 972 B
/** * Error handling utilities for Browser MCP Server */ import { BrowserAutomationError, type BrowserErrorType } from '../types.js'; /** * Wrap async operations with timeout and error handling */ export declare function withTimeout<T>(operation: Promise<T>, timeout: number, errorMessage: string): Promise<T>; /** * Validate URL format */ export declare function validateUrl(url: string): void; /** * Validate CSS selector format */ export declare function validateSelector(selector: string): void; /** * Create standardized error response */ export declare function createErrorResponse(type: BrowserErrorType, message: string, details?: Record<string, unknown>): { isError: true; errorType: BrowserErrorType; content: string; }; /** * Handle Playwright errors and convert to BrowserAutomationError */ export declare function handlePlaywrightError(error: unknown, context: string): BrowserAutomationError; //# sourceMappingURL=error-utils.d.ts.map