Uploaded image for project: 'mod-circulation'
  1. mod-circulation
  2. CIRC-1575

500 Error When Placing TLR/Instance Requests via mod-patron When There Are "Available" but not Pageable Items

    XMLWordPrintable

Details

    • EPAM-Veg Sprint 145, EPAM-Veg Sprint 146, EPAM-Veg Sprint 147
    • 3
    • Vega
    • Morning Glory (R2 2022) Bug Fix
    • Incomplete/missing requirements

    Description

      Overview:

      When placing a request through mod-patron for a title where there are no valid circulation rules (except for the fallback), the module returns a 500 error, rather than creating a TLR hold (or recall).

      Steps to Reproduce:

      1. Create an instance and holdings record with two items
      2. Create a request policy that doesn't allow Page requests. Both items should trigger this policy.
      3. Check out one of the items
      4. Try to create an instance-level request (with EDS or Postman or curl).
        Example: Issue the following API call to edge-patron on Bugfest:
        curl --location --request POST 'https://edge-bugfest-mg.int.aws.folio.org/patron/account/10191/instance/40ddb77a-f0a3-48c3-ab32-be5b8c6c6869/hold?apiKey=<edge api key>' \
        --header 'Content-Type: application/json' \
        --data-raw '{
            "requestDate": "2022-07-27T17:47:52.041Z",
            "pickupLocationId": "51787734-d899-41e6-b6b2-e531a315fd61"
        }'
        
      5. Try to create a regular TLR recall (impossible with FOLIO UI right now, probably a bug).

      Expected Results:

      After step 4: a title-level recall is created and a successful API response is returned (because the order of request types that should be attempted is Recall-Hold-Page)
      After step 5: a title-level recall is created and a successful API response is returned

      Actual Results:

      500 Error is returned

      Additional Information:

      If you can't reproduce, reach out to brookstravis 

      URL:
      Interested parties:

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                oleksandrkurash Alexander Kurash
                brookstravis Brooks Travis
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases