summaryrefslogtreecommitdiff
path: root/talerbank/app/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'talerbank/app/views.py')
-rw-r--r--talerbank/app/views.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/talerbank/app/views.py b/talerbank/app/views.py
index 426937e..d4c1872 100644
--- a/talerbank/app/views.py
+++ b/talerbank/app/views.py
@@ -68,7 +68,7 @@ UINT64_MAX = (2**64) - 1
class LoginFailed(Exception):
hint = "Wrong username/password"
http_status_code = 401
-
+ taler_error_code = 5109
class InvalidInputData(Exception):
def __init__(self, msg):
@@ -93,6 +93,7 @@ class PrivateAccountException(Exception):
class DebitLimitException(Exception):
hint = "Insufficient credit, operation not acceptable."
http_status_code = 406
+ taler_error_code = 5103
##
@@ -102,6 +103,7 @@ class DebitLimitException(Exception):
class SameAccountException(Exception):
hint = "Debit and credit account are the same."
http_status_code = 403
+ taler_error_code = 5102
##
@@ -112,6 +114,14 @@ class RejectNoRightsException(Exception):
hint = "You weren't the transaction credit account, " \
"no rights to reject."
http_status_code = 403
+ taler_error_code = 5200
+
+class UnhandledException(Exception):
+ hint = "Unhandled exception happened!"
+ http_status_code = 500
+ taler_error_code = 5300
+
+
##