We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kgand/document-parser-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
exceptions.py•864 B
"""
Custom exceptions for the document parser.
"""
class DocumentParserError(Exception):
"""Base exception for all document parser errors."""
def __init__(self, message: str, details: str = None):
self.message = message
self.details = details
super().__init__(self.message)
def __str__(self):
if self.details:
return f"{self.message}: {self.details}"
return self.message
class ProcessingError(DocumentParserError):
"""Raised when document processing fails."""
pass
class ConfigurationError(DocumentParserError):
"""Raised when configuration is invalid or missing."""
pass
class NetworkError(DocumentParserError):
"""Raised when network operations fail."""
pass
class ValidationError(DocumentParserError):
"""Raised when input validation fails."""
pass