[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-bank] 03/12: Handling new exeption within the middle
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-bank] 03/12: Handling new exeption within the middleware. |
Date: |
Fri, 29 Mar 2019 18:08:22 +0100 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository bank.
commit a475bd0fede9a3008fb4ffbdac2aad0c0580a6ab
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue Feb 5 16:15:09 2019 +0100
Handling new exeption within the middleware.
---
talerbank/app/middleware.py | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/talerbank/app/middleware.py b/talerbank/app/middleware.py
index 214a21e..a5888e2 100644
--- a/talerbank/app/middleware.py
+++ b/talerbank/app/middleware.py
@@ -7,8 +7,10 @@ from .views import \
LoginFailed, RejectNoRightsException)
from .schemas import \
(URLParameterMissing, URLParameterMalformed,
- JSONFieldException)
-from .amount import CurrencyMismatch, BadFormatAmount
+ JSONFieldException, UnknownCurrencyException)
+from .amount import \
+ (CurrencyMismatch, BadFormatAmount,
+ NumberTooBig, NegativeNumber)
LOGGER = logging.getLogger()
@@ -41,12 +43,15 @@ class ExceptionMiddleware:
CurrencyMismatch: 11,
BadFormatAmount: 11,
LoginFailed: 12,
- RejectNoRightsException: 13}
-
+ RejectNoRightsException: 13,
+ UnknownCurrencyException: 14,
+ NumberTooBig: 1,
+ NegativeNumber: 0}
# List of all the HTTP endpoint that are likely
# to generate exceptions.
self.apis = {
+ "/withdraw": 5400,
"/reject": 5300,
"/history": 5200,
"/admin/add/incoming": 5100}
@@ -58,7 +63,8 @@ class ExceptionMiddleware:
"/profile": "profile",
"/register": "index",
"/public-accounts": "index",
- "/pin/verify": "profile"}
+ "/pin/verify": "profile",
+ "/withdraw": "profile"}
##
# This function is transparently invoked by Django when
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [taler-bank] branch master updated (a3e7f9d -> 8c2d25b), gnunet, 2019/03/29
- [GNUnet-SVN] [taler-bank] 02/12: Minor change for #5542., gnunet, 2019/03/29
- [GNUnet-SVN] [taler-bank] 04/12: providing the 'hint' field to those exeptions missing it., gnunet, 2019/03/29
- [GNUnet-SVN] [taler-bank] 01/12: Hot-addressing #5542., gnunet, 2019/03/29
- [GNUnet-SVN] [taler-bank] 07/12: Addressing #5543., gnunet, 2019/03/29
- [GNUnet-SVN] [taler-bank] 08/12: Addressing #5543., gnunet, 2019/03/29
- [GNUnet-SVN] [taler-bank] 05/12: typo, gnunet, 2019/03/29
- [GNUnet-SVN] [taler-bank] 06/12: Addressing #5543., gnunet, 2019/03/29
- [GNUnet-SVN] [taler-bank] 03/12: Handling new exeption within the middleware.,
gnunet <=
- [GNUnet-SVN] [taler-bank] 12/12: #5546, gnunet, 2019/03/29
- [GNUnet-SVN] [taler-bank] 10/12: syntax, gnunet, 2019/03/29
- [GNUnet-SVN] [taler-bank] 09/12: 5543. Let Jinja render abnormal balances., gnunet, 2019/03/29
- [GNUnet-SVN] [taler-bank] 11/12: syntax, gnunet, 2019/03/29