diff options
| author | rr- | 2016-04-02 10:01:27 +0200 |
|---|---|---|
| committer | rr- | 2016-04-02 10:02:20 +0200 |
| commit | 06cf8c79d4c255e3f69f1c282ebe81139ac3727a (patch) | |
| tree | 1a074acc83d132dc491c8f8f36641e6f050c3f9e /server/szurubooru/services/errors.py | |
| parent | d3d2540b8871968a5adb6bb35fe2795d3116503b (diff) | |
server/api: move validation to service layer
Diffstat (limited to 'server/szurubooru/services/errors.py')
| -rw-r--r-- | server/szurubooru/services/errors.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/server/szurubooru/services/errors.py b/server/szurubooru/services/errors.py index 09fbe51..01be594 100644 --- a/server/szurubooru/services/errors.py +++ b/server/szurubooru/services/errors.py @@ -2,8 +2,9 @@ class AuthError(RuntimeError): ''' Generic authentication error ''' - pass class IntegrityError(RuntimeError): - ''' Database integrity error ''' - pass + ''' Database integrity error (e.g. trying to edit nonexisting resource) ''' + +class ValidationError(RuntimeError): + ''' Validation error (e.g. trying to create user with invalid name) ''' |