exceptions.py 705 B

12345678910111213141516171819202122232425
  1. """Exception classes."""
  2. class APISpecError(Exception):
  3. """Base class for all apispec-related errors."""
  4. class PluginMethodNotImplementedError(APISpecError, NotImplementedError):
  5. """Raised when calling an unimplemented helper method in a plugin"""
  6. class DuplicateComponentNameError(APISpecError):
  7. """Raised when registering two components with the same name"""
  8. class DuplicateParameterError(APISpecError):
  9. """Raised when registering a parameter already existing in a given scope"""
  10. class InvalidParameterError(APISpecError):
  11. """Raised when parameter doesn't contains required keys"""
  12. class OpenAPIError(APISpecError):
  13. """Raised when a OpenAPI spec validation fails."""