A blank nameIdentifier property in DataCite XML causes errors when reading. This causes downstream issues in other systems; for example, datacite/datacite#1970
Expected Behaviour
Blank nameIdentifier properties do not return an error when reading from DataCite XML. The nameIdentifier is excluded in bolognese Metadata object and thus DataCite JSON, CrossCite, etc.
Current Behaviour
Bolognese throws an error when reading a blank nameIdentifier value from DataCite XML.
Steps to Reproduce
Try to contribute an XML document with a blank nameIdentifier property to the REST API. See datacite/datacite#1970
Describe the bug
A blank
nameIdentifier
property in DataCite XML causes errors when reading. This causes downstream issues in other systems; for example, datacite/datacite#1970Expected Behaviour
Blank
nameIdentifier
properties do not return an error when reading from DataCite XML. ThenameIdentifier
is excluded in bolognese Metadata object and thus DataCite JSON, CrossCite, etc.Current Behaviour
Bolognese throws an error when reading a blank
nameIdentifier
value from DataCite XML.Steps to Reproduce
Try to contribute an XML document with a blank
nameIdentifier
property to the REST API. See datacite/datacite#1970Context (Environment)
Screenshots
Further details
Proposal
Hypothesis
The
ni["__content__"]
value may be nil, resulting in a NoMethodError whenstrip
is called: https://github.com/datacite/bolognese/blob/a474fd4e0c3e40efaed870946946fb4e91290bbe/lib/bolognese/author_utils.rb#L33Possible Implementation
Front conversations