summaryrefslogtreecommitdiffstats
path: root/python/fatcat_web
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-11-26 17:35:09 -0800
committerBryan Newbold <bnewbold@robocracy.org>2018-11-26 17:35:09 -0800
commit8b84e83b79de67996e61a3a830e8f395b68085e5 (patch)
treeeff760bd9f07e9f47347c4ec69c69cfac0260398 /python/fatcat_web
parentb2234dff2496cb8fb17214fe91eea13e48d57517 (diff)
downloadfatcat-8b84e83b79de67996e61a3a830e8f395b68085e5.tar.gz
fatcat-8b84e83b79de67996e61a3a830e8f395b68085e5.zip
pass-through more API errors
Diffstat (limited to 'python/fatcat_web')
-rw-r--r--python/fatcat_web/routes.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py
index 64d5931e..0bb7a230 100644
--- a/python/fatcat_web/routes.py
+++ b/python/fatcat_web/routes.py
@@ -278,13 +278,19 @@ def editgroup_view(ident):
@app.route('/editor/<ident>', methods=['GET'])
def editor_view(ident):
- entity = api.get_editor(ident)
+ try:
+ entity = api.get_editor(ident)
+ except ApiException as ae:
+ abort(ae.status)
return render_template('editor_view.html', editor=entity)
@app.route('/editor/<ident>/changelog', methods=['GET'])
def editor_changelog(ident):
- editor = api.get_editor(ident)
- changelog_entries = api.get_editor_changelog(ident)
+ try:
+ editor = api.get_editor(ident)
+ changelog_entries = api.get_editor_changelog(ident)
+ except ApiException as ae:
+ abort(ae.status)
return render_template('editor_changelog.html', editor=editor,
changelog_entries=changelog_entries)
@@ -306,7 +312,10 @@ def changelog_entry_view(index):
@app.route('/stats', methods=['GET'])
def stats_view():
- stats = api.get_stats()
+ try:
+ stats = api.get_stats()
+ except ApiException as ae:
+ abort(ae.status)
return render_template('stats.html', stats=stats.extra)
### Search ##################################################################