Uploaded image for project: 'mod-oai-pmh'
  1. mod-oai-pmh
  2. MODOAIPMH-406

marc_21withholdings doesn't return "no records" response when expected

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • P3
    • Resolution: Cannot Reproduce
    • None
    • None
    • None
    • Firebird Sprint 138
    • 3
    • Firebird

    Description

      Please see comments for more information

      Purpose/Overview:
      If a system has instances with source FOLIO only, then the marc21_withholngs request returns an empty response with an empty resumption token. The "no records found" response should be returned instead.

      The issue was reproduced in snapshot-2 with having 38 instances that are less than max records per response value. Instead of getting the "no records found" response the empty response with an empty resumption token was recieved. Need to investigate the reason for such invalid behavior and do a fix if required.

      Requirements/Scope:

      1. ListRecords request with marc21_withholdings metadata prefix should return the "no records found" response, when there are no instances with source marc were downloaded.

      Acceptance criteria:

      • ListRecords request with marc21_withholdings metadata prefix returns the "no records found" response, when the system doesn't have instances with source MARC or all the downloaded instances by matching search criteria are FOLIO instances only
      • Unit tests updated
      • API tests updated

      Additional information:
      Here is the incorrect response from folio-snapshot-2:

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <OAI-PMH xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd"
      	xmlns="http://www.openarchives.org/OAI/2.0/"
      	xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
      	xmlns:marc="http://www.loc.gov/MARC21/slim"
      	xmlns:oai-identifier="http://www.openarchives.org/OAI/2.0/oai-identifier"
      	xmlns:dc="http://purl.org/dc/elements/1.1/"
      	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      	<responseDate>2022-04-04T18:36:13Z</responseDate>
      	<request verb="ListRecords" resumptionToken="bWV0YWRhdGFQcmVmaXg9bWFyYzIxX3dpdGhob2xkaW5ncyZuZXh0SW5zdGFuY2VQa1ZhbHVlPTM3NCZvZmZzZXQ9MCZyZXF1ZXN0SWQ9NTg1ZDc3MjUtODE0Yy00NjYzLTk1Y2YtNTE3NTRjYTljM2U3Jm5leHRSZWNvcmRJZD0zNzk3Yjc3Zi0zYTUyLTRjMGMtOTcxMC0zYTdlYzFjZWE5MmUmdW50aWw9MjAyMi0wNC0wNFQxODozNjoxM1omZXhwaXJhdGlvbkRhdGU9MjAyMi0wNC0wNVQxODozNjoxM1o">http://folio.org/oai</request>
      	<ListRecords>
      		<resumptionToken cursor="0"></resumptionToken>
      	</ListRecords>
      </OAI-PMH>
      

      Here is the correct response from folio-snapshot:

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <OAI-PMH xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd"
      	xmlns="http://www.openarchives.org/OAI/2.0/"
      	xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
      	xmlns:marc="http://www.loc.gov/MARC21/slim"
      	xmlns:oai-identifier="http://www.openarchives.org/OAI/2.0/oai-identifier"
      	xmlns:dc="http://purl.org/dc/elements/1.1/"
      	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      	<responseDate>2022-04-04T18:29:26Z</responseDate>
      	<request verb="ListRecords" metadataPrefix="marc21_withholdings" from="2022-04-24">http://folio.org/oai</request>
      	<error code="noRecordsMatch">There is no any record found matching search criteria</error>
      </OAI-PMH>
      

      Please note that the correct verbiage should be: There is no records found matching the search criteria

      TestRail: Results

        Attachments

          1. screenshot-1.png
            screenshot-1.png
            717 kB
          2. screenshot-2.png
            screenshot-2.png
            363 kB
          3. screenshot-3.png
            screenshot-3.png
            174 kB

          Issue Links

            Activity

              People

                Oleksandr_Bozhko Oleksandr Bozhko
                TotoroDev Illia Daliek
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases