From 654c5246c77bf5ba476faa9ce9ab61d0666da5ff Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 4 Apr 2019 15:25:47 -0700 Subject: 404 (not 500) from unimplemented lookups --- python/fatcat_web/routes.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'python/fatcat_web') 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/', 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/', 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/', methods=['GET']) def editgroup_view(ident): try: -- cgit v1.2.3