Class: TigerData::MissingMetadata

Inherits:
Object
  • Object
show all
Defined in:
lib/tiger_data/metadata_error.rb

Class Method Summary collapse

Class Method Details

.missing_metadata(schema_version:, errors:) ⇒ Object



7
8
9
10
11
# File 'lib/tiger_data/metadata_error.rb', line 7

def self.(schema_version:, errors:)
  error_messages = errors.full_messages.join(", ")
  # include current expected metadata schema version number, as well as what metadata is missing
  raise TigerData::MetadataError, "Project creation failed with metadata schema version #{schema_version} due to the missing fields: #{error_messages}"
end