diff options
author | Marcello Stanisci <stanisci.m@gmail.com> | 2019-05-31 20:11:56 +0200 |
---|---|---|
committer | Marcello Stanisci <stanisci.m@gmail.com> | 2019-05-31 20:11:56 +0200 |
commit | c43180054aa9440916cf417cd9b123beaedfd078 (patch) | |
tree | 5b46f23f9b9e9125c6504a4667a3686666d5297c /talerbank/app/middleware.py | |
parent | 47d6ec42a49e9a87681d386c4a1dfac5733d7f90 (diff) | |
download | bank-c43180054aa9440916cf417cd9b123beaedfd078.tar.gz bank-c43180054aa9440916cf417cd9b123beaedfd078.tar.bz2 bank-c43180054aa9440916cf417cd9b123beaedfd078.zip |
5715.
Porting the withdraw-state checking logic,
and removig all the old Validictory data/functions.
Diffstat (limited to 'talerbank/app/middleware.py')
-rw-r--r-- | talerbank/app/middleware.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/talerbank/app/middleware.py b/talerbank/app/middleware.py index dd1b3ac..d7c3775 100644 --- a/talerbank/app/middleware.py +++ b/talerbank/app/middleware.py @@ -6,9 +6,12 @@ from .models import BankAccount, BankTransaction from .views import \ (DebitLimitException, SameAccountException, LoginFailed, RejectNoRightsException) + from .schemas import \ - (URLParameterMissing, URLParameterMalformed, - JSONFieldException, URLParamValidationError) + (JSONFieldException, + URLParamValidationError, + InvalidSession) + from .amount import \ (CurrencyMismatch, BadFormatAmount, NumberTooBig, NegativeNumber) @@ -70,8 +73,10 @@ class ExceptionMiddleware: BankTransaction.DoesNotExist: 1, SameAccountException: 2, DebitLimitException: 3, - URLParameterMissing: 8, - URLParameterMalformed: 9, + + ## + # FIXME: needs own error code. + InvalidSession: 0, ## # This one unified class kills the distinction |