[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-blog] branch master updated: more readable errors
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-blog] branch master updated: more readable errors |
Date: |
Thu, 18 Jan 2018 17:45:39 +0100 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository blog.
The following commit(s) were added to refs/heads/master by this push:
new 08d6da0 more readable errors
08d6da0 is described below
commit 08d6da07de24bf3d03ea7088e92a8664d00d84fa
Author: Florian Dold <address@hidden>
AuthorDate: Thu Jan 18 17:45:13 2018 +0100
more readable errors
---
talerblog/blog/blog.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/talerblog/blog/blog.py b/talerblog/blog/blog.py
index 59772d4..d0e0b09 100644
--- a/talerblog/blog/blog.py
+++ b/talerblog/blog/blog.py
@@ -129,17 +129,20 @@ def refund(order_id):
resp = backend_post("refund", refund_spec)
if resp.get("refund_redirect_url"):
return flask.redirect(resp["refund_redirect_url"])
- flask.abort(500)
+ err_abort(500, message="Response from backend incomplete", json=resp)
def render_article(article_name, data, order_id):
article_info = ARTICLES.get(article_name)
if article_info is None:
- flask.abort(500)
+ m = "Internal error: Files for article ({}) not
found.".format(article_name)
+ err_abort(500, message=m)
if data is not None:
if data in article_info.extra_files:
return flask.send_file(get_image_file(data))
- return "permission denied", 403
+ m = "Supplemental file ({}) for article ({}) not found.".format(
+ data, article_name)
+ err_abort(500, message=m)
# the order_id is needed for refunds
return flask.render_template("templates/article_frame.html",
article_file=get_article_file(article_info),
@@ -210,4 +213,3 @@ def article(article_name, data=None):
# no pay_redirect but article not paid, this should never happen!
err_abort(500, message="Internal error, invariant failed", json=pay_status)
-
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-blog] branch master updated: more readable errors,
gnunet <=