Duplicate author names throws an error
skybristol opened this issue · 0 comments
In the doi_create function, throwing in a structure with duplicate author names throws an error. Kind of makes sense, but that's actually flawed business logic for the whole system. I corrected this issue on my end where it makes sense to do so, but there are plenty of cases for the same author name being attached to the same citation. I can see our system having some rule that requires some disambiguating factor to be required in the data such as unique ORCId in those cases.
At any rate, I know that's not your problem with the incredibly useful web app wrapper you've built here. If you have a chance to pass the message on to the DOI Tool folks, though, that would be good.
One thing that might be nice to do in your code, though, would be to add in some kind of error trapping in your functions where you return an exception, perhaps with some coding to indicate success/fail, so that calling code can fail or pass through the exception elegantly instead of just blowing up when the function fails. What I get back on my end is a "list index out of range" exception in both cases I've run into - duplicate author names and resourceURL already in the system.
Ultimately, it would be good to have a real API that applies our particular business rules for how we want DOIs to be handled, checks inbound data thoroughly against those rules, and returns meaningful and specific error messages for anything that fails. I'll see if I can somehow get you the freedom to develop that API directly against the backend of this thing as opposed to the extraordinary pains you've had to go through here.