gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-bank] branch master updated: still polishing error o


From: gnunet
Subject: [GNUnet-SVN] [taler-bank] branch master updated: still polishing error objects
Date: Thu, 04 May 2017 09:41:35 +0200

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository bank.

The following commit(s) were added to refs/heads/master by this push:
     new 70452e7  still polishing error objects
70452e7 is described below

commit 70452e752911db8978864f5f4b5bf7ea307b674b
Author: Marcello Stanisci <address@hidden>
AuthorDate: Thu May 4 09:41:21 2017 +0200

    still polishing error objects
---
 talerbank/app/views.py | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/talerbank/app/views.py b/talerbank/app/views.py
index 935f22b..47c9128 100644
--- a/talerbank/app/views.py
+++ b/talerbank/app/views.py
@@ -422,14 +422,12 @@ def add_incoming(request):
     user_account = auth_and_login(data["auth"])
 
     if not user_account:
-        return JsonResponse({"outcome": "fail",
-                             "hint": "authentication failed"},
+        return JsonResponse(dict(error="authentication failed"),
                              status=401)
 
     if user_account is None:
-        return JsonResponse({"outcome": "fail",
-                             "hint": "authentication failed"},
-                             status=401)
+        return JsonResponse(dict(error="authentication failed"),
+                            status=401)
     logger.info("Submitting wire transfer: '%s'", subject)
     try:
         credit_account = BankAccount.objects.get(user=data["credit_account"])
@@ -441,10 +439,9 @@ def add_incoming(request):
                       credit_account,
                       subject)
     except DebtLimitExceededException:
-        return JsonResponse({"outcome": "fail",
-                             "hint": "debit count has reached its debt limit"},
+        return JsonResponse(dict(error="debit count has reached its debt 
limit"),
                              status=403)
-    return JsonResponse({"outcome": "ok"}, status=200)
+    return HttpResponse(status=200)
 
 
 @login_required

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]