Skip to content

check packageId is a resource map before trying to getDataPackage  #291

@jeanetteclark

Description

@jeanetteclark

Recently I discovered that if getDataPackage is run on a pid with a formatId other than http://www.openarchives.org/ore/terms (in this case it was a resource map accidentally set with formatId text/csv, we get the exceedingly cryptic:

Trying urn:node:ARCTIC
Error in if (!repeated && grepl("%[[:xdigit:]]{2}", URL, useBytes = TRUE)) return(URL) :
missing value where TRUE/FALSE needed

I think it would be helpful if the function checked the sysmeta of that argument before proceeding, and gave an informative error message if it doesn't seem right.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions