Add package init files and exceptions
This commit is contained in:
36
api_testgen/core/exceptions.py
Normal file
36
api_testgen/core/exceptions.py
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
"""Custom exceptions for API TestGen."""
|
||||||
|
|
||||||
|
|
||||||
|
class SpecParserError(Exception):
|
||||||
|
"""Base exception for spec parser errors."""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class InvalidOpenAPISpecError(SpecParserError):
|
||||||
|
"""Raised when OpenAPI specification is invalid."""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class UnsupportedVersionError(SpecParserError):
|
||||||
|
"""Raised when OpenAPI version is not supported."""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class AuthConfigError(Exception):
|
||||||
|
"""Base exception for auth configuration errors."""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class MissingSecuritySchemeError(AuthConfigError):
|
||||||
|
"""Raised when security scheme is not defined in spec."""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class GeneratorError(Exception):
|
||||||
|
"""Base exception for generator errors."""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class TemplateRenderError(GeneratorError):
|
||||||
|
"""Raised when template rendering fails."""
|
||||||
|
pass
|
||||||
Reference in New Issue
Block a user