Skip to main content
Glama

Email Management MCP Server

by Karopatu
handle-error.ts716 B
import { Logger } from "../utils/logger"; export function handleError(customMessage?: string) { return function ( target: unknown, propertyKey: string, descriptor: PropertyDescriptor ) { const originalMethod = descriptor.value; descriptor.value = async function (...args: Array<unknown>) { try { return await originalMethod.apply(this, args); } catch (error) { const errorMessage = error instanceof Error ? error.message : "Unknown error"; Logger.error( `Error in ${target}.${propertyKey}: ${customMessage ?? ""}`, errorMessage ); throw new Error(errorMessage); } }; return descriptor; }; }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Karopatu/email-management-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server