UNPKG

mcp-turso-cloud

Version:

MCP server for integrating Turso with LLMs

23 lines (22 loc) 513 B
/** * Error handling utilities for the Turso MCP server */ /** * Custom error class for Turso API errors */ export class TursoApiError extends Error { constructor(message, status_code) { super(message); this.name = 'TursoApiError'; this.status_code = status_code; } } /** * Get error message from various error types */ export function get_error_message(error) { if (error instanceof Error) { return error.message; } return 'An unknown error occurred'; }