Skip to content
Snippets Groups Projects
Commit 2a6ce96e authored by Paul Millar's avatar Paul Millar
Browse files

update_oai-pmh robust against metadata prefix lookup failures

Motivation:

The ListMetadataFormats call can fail.  Currently, this causes the enire
script to fail.

Modification:

Catch the exception and report a failure.

Result:

A metadata prefix lookup failure is now limited to a single
OAI-PMH endpoint
parent f2fef214
No related branches found
No related tags found
1 merge request!64update_oai-pmh Add a back-off strategy, to allow a service to recover
......@@ -346,7 +346,12 @@ def query_oai_pmh_endpoint(endpoint)
return status, [], {}, 0, {}
end
dc_prefix = metadata_prefix_of(endpoint, 'http://www.openarchives.org/OAI/2.0/oai_dc/')
begin
dc_prefix = metadata_prefix_of(endpoint, 'http://www.openarchives.org/OAI/2.0/oai_dc/')
rescue StandardError => e
print_with_time("Error: metadata_prefix_of failed: #{e.message}")
return "Error", [], {}, 0, {}
end
set_names = list_sets(endpoint)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment