Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions src/eps_spine_shared/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,26 @@
from spinecore.prescriptions.common.errors.errorbase1722 import ( # pyright: ignore[reportMissingImports]
ErrorBase1722,
)
from spinecore.prescriptions.common.local_validator import ( # pyright: ignore[reportMissingImports]
ValidationError,
)

on_spine = True
except ImportError:
pass


class ValidationError(Exception):
"""
Exception to be raised by a validation method - needs to be passed supplementary
information to be appended to the error response text.
"""

def __init__(self, supplementary_info):
"""
Add supplementary information
"""
super(ValidationError, self).__init__(supplementary_info)
self.suppInfo = supplementary_info


if on_spine:

class EpsNoCredentialsErrorWithRetry:
Expand Down
Loading