DOI import wizard: misleading error with whitespace input #368

Open
opened 2026-06-29 05:07:17 +00:00 by mih · 0 comments
Owner

I'd argue that most DOIs are C&P'ed, not typed. It is therefore not unlikely to have leading or trailing whitespace in the field input of the DOI import wizard. In such cases, a "NetworkError" is reported to the user -- which is a complicated way of saying that no such record could be retrieved.

DOI Fetch Error: TypeError: NetworkError when attempting to fetch resource.

Ideally, this error is C&P anticipated and the input is sanitized by removing trailing AND leading whitespace. This appears to be already the case for trailing whitespace. I believe that no valid DOI has any surrounding whitespace, so this should be fine and useful in all cases.

I'd argue that most DOIs are C&P'ed, not typed. It is therefore not unlikely to have leading or trailing whitespace in the field input of the DOI import wizard. In such cases, a "NetworkError" is reported to the user -- which is a complicated way of saying that no such record could be retrieved. `DOI Fetch Error: TypeError: NetworkError when attempting to fetch resource.` Ideally, this error is C&P anticipated and the input is sanitized by removing trailing AND leading whitespace. This appears to be already the case for trailing whitespace. I believe that no valid DOI has any surrounding whitespace, so this should be fine and useful in all cases.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
orinoco/shacl-vue#368
No description provided.