CottageLabs/OpenArticleGauge

Invalid DOI causes a 500 error.

Opened this issue · 2 comments

The DOI 10.1016/0958–1669(95)80016–6 causes a 500 internal server error (I am using the API but I see this on the lookup page too). Note that those are unicode dashes \u2013. If I use 'normal' \u002d dashes then it works without error.

Not saying that I expect a result since this DOI is obviously incorrect. I just don't think that it should return a 500 error.

Yeah, it shouldn't - thanks for reporting. We don't screen the identifiers much, possibly just strip spaces and such. This should report 400 Bad Request if any non-ASCII characters are detected in the identifiers.

Also just a note for later: I'd be wary of starting to strip or replace stuff on the fly, it breaks the feedback loop of "what I put in" vs. "what happened" - so we should report the problem and let the user fix it if they want to.

Since we do batch processing my preference would be to see it in the errors result array