This commit is contained in:
@@ -1,17 +1,26 @@
|
||||
"""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
|
||||
self.field = field
|
||||
|
||||
Reference in New Issue
Block a user