27 lines
572 B
Python
27 lines
572 B
Python
"""Forms module exceptions"""
|
|
import logging
|
|
|
|
class FormServiceError(Exception):
|
|
"""Form service exception"""
|
|
def __init__(self, message: str):
|
|
super().__init__(message)
|
|
logging.error('FormService : %s', message)
|
|
|
|
|
|
class UserNotFoundError(FormServiceError):
|
|
pass
|
|
|
|
|
|
class ProductorNotFoundError(FormServiceError):
|
|
pass
|
|
|
|
|
|
class FormNotFoundError(FormServiceError):
|
|
pass
|
|
|
|
|
|
class FormCreateError(FormServiceError):
|
|
def __init__(self, message: str, field: str | None = None):
|
|
super().__init__(message)
|
|
self.field = field
|