Skip to main content
Glama
tanamurayuuki

Gemini URL Context & Search MCP Server

DomainError.ts1.67 kB
export abstract class DomainError extends Error { abstract readonly type: string; constructor(message: string, public readonly cause?: Error) { super(message); this.name = this.constructor.name; } } export class InvalidUrlError extends DomainError { readonly type = 'InvalidUrl'; constructor(url: string, cause?: Error) { super(`Invalid URL format: ${url}`, cause); } } export class UnsupportedProtocolError extends DomainError { readonly type = 'UnsupportedProtocol'; constructor(protocol: string) { super(`Only HTTP and HTTPS protocols are supported, got: ${protocol}`); } } export class InvalidModelError extends DomainError { readonly type = 'InvalidModel'; constructor(model: string, allowedModels: string[]) { super(`Unsupported model name: ${model}. Allowed models: ${allowedModels.join(', ')}`); } } export class UpstreamUnavailableError extends DomainError { readonly type = 'UpstreamUnavailable'; constructor(message: string, cause?: Error) { super(`Upstream service unavailable: ${message}`, cause); } } export class SafetyBlockedError extends DomainError { readonly type = 'SafetyBlocked'; constructor(message: string = 'Content was blocked by safety filters') { super(message); } } export class RateLimitError extends DomainError { readonly type = 'RateLimit'; constructor(message: string = 'Rate limit exceeded') { super(message); } } export class ContentTooLargeError extends DomainError { readonly type = 'ContentTooLarge'; constructor(size: number, maxSize: number) { super(`Content size ${size} exceeds maximum allowed size ${maxSize}`); } }

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/tanamurayuuki/MCP-URLcontext'

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