Skip to main content
Glama

Finizi B4B MCP Server

by hqtrung
errors.py1.04 kB
"""Custom exception classes for the MCP server.""" class MCPAuthenticationError(Exception): """Raised when authentication fails or is missing.""" def __init__(self, message: str = "Authentication required. Please provide a valid token."): self.message = message super().__init__(self.message) class MCPAuthorizationError(Exception): """Raised when user lacks permission to access a resource.""" def __init__( self, message: str = "You do not have permission to access this resource.", ): self.message = message super().__init__(self.message) class MCPValidationError(Exception): """Raised when input validation fails.""" def __init__(self, message: str, field: str | None = None): self.message = message self.field = field super().__init__(self.message) def __str__(self) -> str: if self.field: return f"Validation error for '{self.field}': {self.message}" return f"Validation error: {self.message}"

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/hqtrung/finizi-mcp'

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