summaryrefslogtreecommitdiff
path: root/talerbank/app/schemas.py
diff options
context:
space:
mode:
Diffstat (limited to 'talerbank/app/schemas.py')
-rw-r--r--talerbank/app/schemas.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/talerbank/app/schemas.py b/talerbank/app/schemas.py
index 6c08acf..2ff7892 100644
--- a/talerbank/app/schemas.py
+++ b/talerbank/app/schemas.py
@@ -1,6 +1,6 @@
##
# This file is part of TALER
-# (C) 2014, 2015, 2016 Taler Systems SA
+# (C) 2014, 2015, 2016, 2020 Taler Systems SA
#
# TALER is free software; you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ -25,6 +25,7 @@ from django.core.exceptions import ValidationError
from django import forms
from django.core.validators import RegexValidator
from urllib.parse import urlparse
+from taler.util.taler_error_codes import ErrorCode
##
# Constant value for the biggest number the bank handles.
@@ -59,7 +60,7 @@ class InternalServerError(Exception):
def __init__(self, hint):
self.hint = hint
self.http_status_code = 500
- self.taler_error_code = 1011 # TALER_EC_INTERNAL_LOGIC_ERROR
+ self.taler_error_code = ErrorCode.INTERNAL_LOGIC_ERROR
##
@@ -82,7 +83,7 @@ class JSONFieldException(ValueError):
super(JSONFieldException, self).__init__(line)
self.hint = line
self.http_status_code = http_status_code
- self.taler_error_code = 5106
+ self.taler_error_code = TalerErrorCode.BANK_JSON_INVALID
##
@@ -99,7 +100,7 @@ class URLParamValidationError(ValueError):
def __init__(self, error, http_status_code):
self.hint = json.stringify(error.as_json())
self.http_status_code = http_status_code
- self.taler_error_code = 5105
+ self.taler_error_code = ErrorCode.BANK_PARAMETER_MISSING_OR_INVALID
super().__init__()