Skip to content
Snippets Groups Projects
Commit bc89ebcf authored by Tanner Prestegard's avatar Tanner Prestegard Committed by Alexander Pace
Browse files

properly handling parseExceptions for non-LVC queries from 'latest' page

parent 144f4ba6
No related branches found
No related tags found
No related merge requests found
......@@ -499,8 +499,9 @@ def search(request, format=""):
msg = 'FAR query out of range, upper limit must be below %s' % settings.VOEVENT_FAR_FLOOR
return HttpResponseBadRequest(msg)
except ParseException:
# If the user's query throws a parse exception, it is safe to
# proceed and show the error message in the search results template (red star)
# If the user's query throws a parse exception, it is safe to
# proceed and show the error message in the search results
# template (red star)
pass
except Exception, e:
return HttpResponseServerError(str(e))
......@@ -725,6 +726,11 @@ def latest(request):
except BadFARRange:
msg = 'FAR query out of range, upper limit must be below %s' % settings.VOEVENT_FAR_FLOOR
return HttpResponseBadRequest(msg)
except ParseException:
# If the user's query throws a parse exception, it is safe to
# proceed and show the error message in the search results template
# (red star)
pass
if form.is_valid():
# XXX This makes the requests much faster for internal users.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment