Closed jsaliba10 closed 3 years ago
I see the same thing - the API is throwing an error trying to find those EIDs which is very odd. I can find them in the console and in the database and I can run the exact code the API endpoint runs in the console and it works fine. I took a snapshot of the DB and i'll try to reproduce locally.
So this was a weird one.
The underlying error was that two of these three evidence items appear to not have a source attached to them which is an invalid state.
It looks like the user tried twice to submit evidence and it "failed" both times and then tried a third time later and that one succeeded. The failures however produced evidence records in the db that were incomplete instead of erroring out entirely. There are several things going on here:
The initial failure was due to an error thrown by the PubMed API we call to validate that a pubmed id we haven't seen before is valid
At this point the form should no longer allow a user to submit since we can't validate it but it appears that it did.
On the back-end we need to do a better job validating that an incoming request is valid, right now we only do a few checks and mostly just trust that the form has submitted a (schematically) valid entity since that's been the only avenue to submit evidence thus far.
On the frontend the form needs to provide more feedback to the user about error states like this.
The immediate issue is resolved as I was able to recover the intended pubmed id from the logs and filled it in and now those pages will load. In my non-editor opinion, it appears the EIDs are mostly duplicates with slightly varied summaries due to the repeated submission attempts. If the editors determine that to be the case, we can clean up the duplicates instead of rejecting so this user isn't penalized for a bug on our end, just let me know.
The data validation on our end is covered by #1094 and I will make a new issue for the form feedback issue. We should prioritize at least initial attempts at both of these as frustrating our users who are contributing content is the last thing we want to do.
Thanks for looking into this Adam. I'll review and verify if they are duplicates.
The 3 latest EIDS entered into CIVIC 8866, 8867, 8868 cannot be accessed. On the homepage, clicking on them does not result in the loading of the eid, but I remain stuck on the homepage. When on the activity page, an error message redirecting me to the home page pops up. From the user page of LaveniyaSatgunaseelan, the same error message comes up and I am redirected to the home page. On the ATRX gene page, clicking on the "loss-of-function" variant results in this redirection as well.
All three of these curations were tagged with ClinGen as the org.