GetRecord unexpectedly returns "invalidRecordContent" error for deleted MARC Instance

Description

Overview:
GetRecord unexpectedly returns "invalidRecordContent" error (instead of expected "idDoesNotExist" error) in the following case:
In OAI-PMH settings Deleted records support set to No
MARC Instance is deleted by set LDR 05 to d

Steps to recreate:

  1. Go to “Settings“ => “OAI-PMH“ => “Behavior“

  2. Set the following settings and clicj “Save“ button:
    “Record source“ to “Source records storage“
    ”Deleted records support” to “No“

  3. Go to “Inventory“ app => Find any MARC Instance and open its detailed view

  4. Click “Actions“ => “Edit MARC bibliographic record“

  5. In LDR field select “d - Deleted“ in “Status“

  6. Click “Save & close“ button

  7. send GetRecord request with identifier of the record edited above

Expected results:
GetRecord response contains <error code="idDoesNotExist">No matching identifier in repository.</error>

Actual Results:
GetRecord response contains <error code="invalidRecordContent">Invalid character in the record.</error>

2024-04-18_18h53_39.png

Additional Information: For “Deleted records support” setting set to “Persistent” or “Transient” GetRecord response is as expected when record is marked "deleted"

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Attachments

22
  • 29 Nov 2024, 06:19 AM
  • 29 Nov 2024, 06:19 AM
  • 29 Nov 2024, 06:19 AM
  • 29 Nov 2024, 06:19 AM
  • 29 Nov 2024, 06:18 AM
  • 29 Nov 2024, 06:18 AM
  • 29 Nov 2024, 06:18 AM
  • 29 Nov 2024, 06:18 AM
  • 29 Nov 2024, 06:18 AM
  • 25 Nov 2024, 02:34 PM
  • 25 Nov 2024, 02:34 PM
  • 25 Nov 2024, 02:34 PM

Checklist

hide

Activity

Show:

Tatsiana HryhoryevaNovember 29, 2024 at 6:19 AM

Verified on https://bugfest-ramsons.int.aws.folio.org/ environment, works as expected

In OAI-PMH settings Deleted records support set to No

Scenario 1 - Harvest MARC Instance with invalid characters

  • GetRecord

    image-20241129-061207.png
  • ListRecords

    image-20241129-061245.png
  • ListIdentifiers

    image-20241129-061317.png



Scenario 2 - Harvest deleted MARC Instance (LDR 05 set to “d“)

  • GetRecord

    image-20241129-061454.png
  • ListRecords

    image-20241129-061516.png
  • ListIdentifiers

    image-20241129-061542.png

Scenario 3 - Harvest deleted MARC Instance (Set for deletion)

  • GetRecord

    image-20241129-061650.png
  • ListRecords

    image-20241129-061714.png
  • ListIdentifiers

    image-20241129-061735.png

JenkinsNotificationsNovember 27, 2024 at 4:41 PM

Deployed to the Ramsons bf env. Moved status to In bugfix review from status Awaiting deployment. Please proceed with the verification.

Tatsiana HryhoryevaNovember 25, 2024 at 2:34 PM

Hi ,

Verified on https://folio-snapshot.dev.folio.org/ environment, works as expected

In OAI-PMH settings Deleted records support set to No

Scenario 1 - Harvest MARC Instance with invalid characters

  • GetRecord

    2024-11-25_16h53_12.png
  • ListRecords

    2024-11-25_16h54_49.png
  • ListIdentifiers

    2024-11-25_16h55_57.png

Scenario 2 - Harvest deleted MARC Instance (LDR 05 set to “d“)

  • GetRecord

    2024-11-25_16h53_45.png
  • ListRecords

    2024-11-25_16h55_08.png
  • ListIdentifiers

    2024-11-25_16h56_18.png

Scenario 3 - Harvest deleted MARC Instance (Set for deletion)

  • GetRecord

    2024-11-25_16h54_06.png
  • ListRecords

    2024-11-25_16h55_28.png
  • ListIdentifiers

    2024-11-25_16h56_36.png

Viachaslau KhandramaiNovember 25, 2024 at 1:42 PM

, please, verify.

Viachaslau KhandramaiNovember 25, 2024 at 1:42 PM

Verified on https://folio-snapshot.dev.folio.org .

  1. Make importing of two mrc files: Loading file... , Loading file....

  2. For the first record (record-for-deletion.mrc) go to inventory and set via quickMARC status: d-deleted:

    image-20241125-133542.png
  3. Go to Settings OAI-PMH/Behaviour and set Deleted records support to No.

  4. Make GetRecord request for both identifiers record-for-deletion.mrc and invalid-character-record.mrc to be sure that errors are displayed correctly - idDoesNotExist for deleted and invalidRecordContentfor record with invalid character in content:

GET /oai/records?metadataPrefix=marc21_withholdings&verb=GetRecord&identifier=oai:folio.org:diku/36bda3f3-44d6-4542-894f-25ca16d6155a HTTP/1.1 Accept-Encoding: identity X-Okapi-Tenant: ${TENANT} X-Okapi-Token: ${TOKEN} User-Agent: PostmanRuntime/7.42.0 Accept: */* Postman-Token: e0192a04-9110-4ab1-8a04-a5e8a1fe7e03 Host: folio-snapshot-okapi.dev.folio.org:443 Connection: keep-alive HTTP/1.1 200 OK Date: Mon, 25 Nov 2024 13:31:22 GMT Content-Type: text/xml Transfer-Encoding: chunked Connection: keep-alive <?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>2024-11-25T13:31:22Z</responseDate><request verb="GetRecord" identifier="oai:folio.org:diku/36bda3f3-44d6-4542-894f-25ca16d6155a" metadataPrefix="marc21_withholdings">http://folio.org/oai</request><error code="idDoesNotExist">No matching identifier in repository.</error></OAI-PMH>
GET /oai/records?metadataPrefix=marc21_withholdings&verb=GetRecord&identifier=oai:folio.org:diku/52dec540-0805-4dc8-a82a-e6bc3cea74b7 HTTP/1.1 Accept-Encoding: identity X-Okapi-Tenant: ${TENANT} X-Okapi-Token: ${TOKEN} User-Agent: PostmanRuntime/7.42.0 Accept: */* Postman-Token: 721a771b-65ab-416d-8842-f0849e00c5e7 Host: folio-snapshot-okapi.dev.folio.org:443 Connection: keep-alive HTTP/1.1 404 Not Found Date: Mon, 25 Nov 2024 13:32:03 GMT Content-Type: text/xml Transfer-Encoding: chunked Connection: keep-alive <?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>2024-11-25T13:32:03Z</responseDate><request verb="GetRecord" identifier="oai:folio.org:diku/52dec540-0805-4dc8-a82a-e6bc3cea74b7" metadataPrefix="marc21_withholdings">http://folio
Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Firebird

Fix versions

Release

Ramsons (R2 2024) Bug Fix

RCA Group

TBD

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created April 18, 2024 at 1:58 PM
Updated December 5, 2024 at 4:50 AM
Resolved November 26, 2024 at 4:27 AM
TestRail: Cases
TestRail: Runs

Flag notifications