Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error when nonhierarchical relation row is missing an ID #40

Open
kspurgin opened this issue Jul 26, 2023 · 0 comments
Open

Improve error when nonhierarchical relation row is missing an ID #40

kspurgin opened this issue Jul 26, 2023 · 0 comments

Comments

@kspurgin
Copy link
Collaborator

Currently it is this, which does show the error, but it's buried in undefined method message:

ERROR in CollectionspaceMigrationTools::Csv::BatchProcessor.process
MESSAGE:
undefined method `each' for #<CollectionSpace::Mapper::Response:0x0000000113602818 @handler=<#CollectionSpace::Mapper::HandlerFullRecord:12310 nonhierarchicalrelationship https://westerville.staging.collectionspace.org/cspace-services>, @orig_data={"item2_id"=>"O1049021", "item1_type"=>"movements", "item2_type"=>"collectionobjects"}, @errors=["required field missing: item1_id must be present"], @warnings=[], @merged_data={"item2_id"=>"O1049021", "item1_type"=>"movements", "item2_type"=>"collectionobjects", "relationshiptype"=>"affects"}, @states=[:defaults_merged, :merged_keys_downcased, :validated], @xpaths=nil, @split_data={}, @transformed_data={}, @combined_data={}, @doc=nil, @terms=[], @identifier=""> IN /Users/kristina/code/cs/migration_tools/lib/collectionspace_migration_tools/csv/row_processor.rb:45:in `handle_failure'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant