[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-merchant-demos] branch master updated: debug
From: |
gnunet |
Subject: |
[taler-taler-merchant-demos] branch master updated: debug |
Date: |
Tue, 11 May 2021 09:12:57 +0200 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository taler-merchant-demos.
The following commit(s) were added to refs/heads/master by this push:
new 3f4952f debug
3f4952f is described below
commit 3f4952f15ede6fe3529f093ec4c188c0455f1d6d
Author: MS <ms@taler.net>
AuthorDate: Tue May 11 09:12:54 2021 +0200
debug
---
talermerchantdemos/httpcommon/__init__.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/talermerchantdemos/httpcommon/__init__.py
b/talermerchantdemos/httpcommon/__init__.py
index 894cd7a..8546ff0 100644
--- a/talermerchantdemos/httpcommon/__init__.py
+++ b/talermerchantdemos/httpcommon/__init__.py
@@ -7,7 +7,9 @@ import time
from flask_babel import gettext
import os
import re
+import logging
+LOGGER = logging.getLogger(__name__)
class BackendException(Exception):
"""Exception for failed communication with the Taler merchant backend"""
@@ -17,6 +19,12 @@ class BackendException(Exception):
self.backend_status = backend_status
self.backend_json = backend_json
+def exception_handler(func):
+ def inner(*args, **kwargs):
+ try:
+ func(*args, **kwargs)
+ except BackendException as err:
+ LOGGER.error(err.backend_json)
##
# POST a request to the backend, and return a error
@@ -26,6 +34,7 @@ class BackendException(Exception):
# this request.
# @param json the POST's body.
# @return the backend response (JSON format).
+@exception_handler
def backend_post(backend_url, endpoint, json, auth_token=None):
headers = dict()
if auth_token is not None:
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-taler-merchant-demos] branch master updated: debug,
gnunet <=