Skip to content

Commit

Permalink
more verbose error msg for MissingPid
Browse files Browse the repository at this point in the history
  • Loading branch information
cassws committed Aug 30, 2020
1 parent 59aaac7 commit 5973862
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/wax_tasks/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def self.ingest(source)
# @return [Array] same data unless a an item is missing the key `pid`
# @raise WaxTasks::Error::MissingPid
def self.assert_pids(data)
data.each_with_index { |d, i| raise Error::MissingPid, "Collection is missing pid for item #{i}." unless d.key? 'pid' }
data.each_with_index { |d, i| raise Error::MissingPid, "Collection is missing pid for item #{i}.\nHint: review common .csv formatting issues (such as hidden characters) in the documentation: https://minicomp.github.io/wiki/wax/preparing-your-collection-data/metadata/" unless d.key? 'pid' }
data
end

Expand Down

0 comments on commit 5973862

Please sign in to comment.