Skip to content

Commit

Permalink
Merge pull request #225 from stanfordnmbl/fix-exceptions-dequeue
Browse files Browse the repository at this point in the history
Fixing problem with exceptions in dequeue. It was always raising 404.
  • Loading branch information
AlbertoCasasOrtiz authored Oct 3, 2024
2 parents 7ad7565 + 50b2de5 commit f375330
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mcserver/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1521,10 +1521,9 @@ def dequeue(self, request):

serializer = TrialSerializer(trial, many=False)


except Http404:
raise Http404 # we use the 404 to tell app.py that there are no trials, so need to pass this thru
except Exception:
if Http404: # we use the 404 to tell app.py that there are no trials, so need to pass this thru
raise Http404
if settings.DEBUG:
raise APIException(_("error") % {"error_message": str(traceback.format_exc())})
raise APIException(_('trial_dequeue_error'))
Expand Down

0 comments on commit f375330

Please sign in to comment.