Skip to main content
Glama

MCP Content Analyzer

by DuncanDam
error-handler.ts575 B
import type { ErrorHandler } from 'hono'; import { logger } from '../utils/logger.js'; export const errorHandler: ErrorHandler = (err, c) => { const status = (err as any).status || 500; const message = err.message || 'Internal Server Error'; logger.error('Request error', { error: message, status, path: c.req.path, method: c.req.method, stack: err.stack, timestamp: new Date().toISOString() }); return c.json({ success: false, error: { message, status, timestamp: new Date().toISOString() } }, status); };

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/DuncanDam/my-mcp'

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