code4lib / ruby-oai

a Ruby library for building OAI-PMH clients and servers
MIT License
62 stars 42 forks source link

Exception using list_records.full #83

Closed yulgit1 closed 2 years ago

yulgit1 commented 4 years ago

Running the method: client.list_records(:metadata_prefix => 'marc21').full.count

And getting Exception: OAI::Exception: either 'metadataPrefix' or 'resumptionToken' is required

Full stack trace: https://gist.github.com/yulgit1/9a39d0244b3accf6479cb216838588ef

I believe it is occurring at the end, as when I do a list_records.full of a repo with ~60 k objects (which takes ~30 minutes), this error occurs after ~59000.

I also suspect this line: https://github.com/code4lib/ruby-oai/blob/master/lib/oai/client.rb#L219 where perhaps the last resumption of course won't have a resumption token, but no metadataPrefix is passed either. But I'm not certain. I'm having difficulty testing the gem for this, but posting this issue in case anyone has any insight.

barmintor commented 2 years ago

Hello,

After a bit of work, I am unable to reproduce this error on the test providers on the main branch here. Can you provide any more information about the service or the Provider implementation?

barmintor commented 2 years ago

Closing pending further information.