summaryrefslogtreecommitdiffstats
path: root/python/fatcat_web
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-04-04 15:25:47 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-04-04 15:25:47 -0700
commit654c5246c77bf5ba476faa9ce9ab61d0666da5ff (patch)
treecd4bf6379483b3856bd8dbcb8ccb4366315739b2 /python/fatcat_web
parent5f4ceedbf87176fc0f8628dc102d9beee6c03c29 (diff)
downloadfatcat-654c5246c77bf5ba476faa9ce9ab61d0666da5ff.tar.gz
fatcat-654c5246c77bf5ba476faa9ce9ab61d0666da5ff.zip
404 (not 500) from unimplemented lookups
Diffstat (limited to 'python/fatcat_web')
-rw-r--r--python/fatcat_web/routes.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py
index a2a433a8..44216809 100644
--- a/python/fatcat_web/routes.py
+++ b/python/fatcat_web/routes.py
@@ -175,7 +175,7 @@ def fileset_history(ident):
@app.route('/fileset/lookup', methods=['GET'])
def fileset_lookup():
- raise NotImplementedError
+ abort(404)
@app.route('/fileset/<ident>', methods=['GET'])
def fileset_view(ident):
@@ -212,7 +212,7 @@ def webcapture_history(ident):
@app.route('/webcapture/lookup', methods=['GET'])
def webcapture_lookup():
- raise NotImplementedError
+ abort(404)
@app.route('/webcapture/<ident>', methods=['GET'])
def webcapture_view(ident):
@@ -245,6 +245,7 @@ def release_lookup():
try:
resp = api.lookup_release(**{extid: request.args.get(extid)})
except ApiException as ae:
+ app.log.info(ae)
abort(ae.status)
return redirect('/release/{}'.format(resp.ident))
@@ -311,6 +312,10 @@ def work_view(ident):
return render_template('deleted_entity.html', entity=entity, entity_type="work")
return render_template('work_view.html', work=entity, releases=releases)
+@app.route('/work/lookup', methods=['GET'])
+def work_lookup():
+ abort(404)
+
@app.route('/editgroup/<ident>', methods=['GET'])
def editgroup_view(ident):
try: