VEuPathDB / plot.data

1 stars 0 forks source link

Getting 500 responses from histogram and mosaic endpoints instead of desired valid but empty response #101

Closed bobular closed 2 years ago

bobular commented 3 years ago

Back end: dfalke-b Study: India ICEMR Fever Surveillance Subset on: Dengue, by Panbio Dengue Early ELISA = Positive

Histogram viz using main variable = Plasmodium falciparum asexual stages, by microscopy result

 500 Internal Server Error {"status":"server-error","message":"Unable to complete processing","requestId":"6BMaiK4IyotjWIvJ1cHszA"}

Works OK without the subsetting.

bobular commented 3 years ago

Actually, @ryanrdoherty, - ignore what I just typed here... sorry

bobular commented 3 years ago

Right - got my head round it at last!

Background: barplot with a similar combination of variables, is returning a non-error, but zero data result, which I am currently catching and handling as part of this ticket (sneak preview)

image

However, histogram is throwing a generic 500 in similar circumstances, but should ideally return either an empty valid response like barplot, or throw an error with a message that I can catch

I'll report back on the other endpoints as I get to them.

bobular commented 3 years ago

Same goes for 2x2 mosaic - in India ICEMR Fever Surveillance Subset on: Dengue, by Panbio Dengue Early ELISA = Positive

It's returning a 500 for any combination of X and Y variables Actually it's not. Sex vs Existing Illness is OK.

I have a meeting now - will come back to clarify what's needed here.

(scatterplot and boxplot are fine, btw)

bobular commented 3 years ago

As above, 2x2 for Sex vs. Visited other health facility --> 500 response This may be because the four Partipicants with this data are all sex==male?

bobular commented 3 years ago

But I do think also that the "zero results" (not zero subset) response of Mosaic is also giving a 500 instead of a completeCasesAxesVars: 0 type result

Here's my working.

Same study as above.

Subset on Plasmodium vivax asexual stages, by microscopy result == check all values

Go to Plasmodium falciparum gametocytes, by microscopy result in subsetting and see that there are zero in the subset

Go to Mosaic RxC and plot X Sex Y Plasmodium falciparum gametocytes, by microscopy result

--> 500 "Unable to complete processing"

d-callan commented 3 years ago

@bobular there are some cases where the api claims it should be returning a number, but in cases such as these its not really reasonable. ex: bin slider values in the histogram. what should they be, do we think? empty {} ? NA ?

d-callan commented 3 years ago

im starting to think we should move this to phase 2, catch in the data service, and make this yet another 400.

d-callan commented 3 years ago

ive put low cost, since its already mostly done in plot.data.

d-callan commented 2 years ago

i moved away from this in favor of things like mbio and line plot etc. but its been referenced a few times recently and seems like its probably increasing again in priority.

danicahelb commented 2 years ago

agree @d-callan this issue keeps cropping up so it is a priority to fix. thanks!

d-callan commented 2 years ago

qa should wait on this until @bobular is done as well

d-callan commented 2 years ago

hey @nkittur-uga just want to clarify for qa what the issue here was since its fairly specific. The breaking cases we saw across a variety of tickets all had to do w the particular combination of filters and variables chosen in the viz tab resulting in no remaining complete cases. to be explicitly clear, there WAS data remaining generally speaking after filtering alone. BUT the variables chosen in the viz tab either didnt have data for that subset or didnt have any data overlapping (collected at different time points etc)

nkittur-uga commented 2 years ago

I get an informative note: "The visualization cannot be made because there is no plottable data for currently selected variable(s) in the current subset." QA is complete.

bobular commented 2 years ago

Thanks @nkittur-uga :-)