Skip to content

Commit

Permalink
fix: ensure stack traces not passed to client (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
alubbock authored Sep 3, 2024
1 parent fad6f1f commit a04f284
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions thunorweb/views/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ def _setup_dr_par(name, needs_toggle=False):
template=template
)
except CannotPlotError as e:
return HttpResponse(e, status=400)
return HttpResponse(str(e), status=400)
else:
dip_absolute = request.GET.get('drcType', 'rel') == 'abs'
plot_fig = plot_drc(
Expand Down Expand Up @@ -674,7 +674,7 @@ def _get_viability_scores(datasets, drug_id, cell_line_id, viability_time):
include_controls=True
)
except NotImplementedError as e:
return HttpResponse(e, status=400)
return HttpResponse(str(e), status=400)
if expt_resp_data['viability'].isnull().values.all():
return HttpResponse('No viability for this time point. The '
'nearest time point to the time entered '
Expand Down

0 comments on commit a04f284

Please sign in to comment.