Skip to main content
Glama
http-error.ts634 B
/** * Custom error class for HTTP errors with status codes */ export class HttpError extends Error { /** * Create an HTTP error * @param message - Error message * @param status - HTTP status code * @param retryAfter - Optional Retry-After header value (seconds or date string) */ constructor( message: string, public status: number, public retryAfter?: string ) { super(message); this.name = 'HttpError'; // Maintains proper stack trace for where our error was thrown (only available on V8) if (Error.captureStackTrace) { Error.captureStackTrace(this, HttpError); } } }

Latest Blog Posts

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/rawveg/ollama-mcp'

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