diff --git a/simple_app/app_simple.py b/simple_app/app_simple.py index 6447cb0..c8210c2 100644 --- a/simple_app/app_simple.py +++ b/simple_app/app_simple.py @@ -191,6 +191,8 @@ def solo_result(query: str): # search database for given object resultdict: dict = db.inventory(query) + if not len(resultdict): + abort(404, f'"{query}" does match any result in SIMPLE!') everything = Inventory(resultdict) # create camd and spectra plots diff --git a/simple_app/templates/bad_request.html b/simple_app/templates/bad_request.html index 8d9bb31..8b9ef41 100644 --- a/simple_app/templates/bad_request.html +++ b/simple_app/templates/bad_request.html @@ -3,9 +3,9 @@ {% block content %} -
+

{{ e.code|safe }}

-

Something went wrong!

+

Something went wrong:
{{ e.description|safe }}

Please send the above error code and what you were trying to do, to the developers.