Details
-
Bug
-
Status: Open (View Workflow)
-
P4
-
Resolution: Unresolved
-
None
-
None
-
-
Volaris
Description
Overview:
Renewal failure messages are not internationalized in src/withRenew.js::getMessage(). It may be necessary to update src/components/Loans/OpenLoans/helpers/isOverridePossible/overridePossibleMessages.js as well.
Steps to Reproduce:
- Log into Snapshot
- Check out Item 1 to Patron 1
- In settings, modify the loan policy for the created loan to have a Number of Renewals Allowed of 1
- Navigate to the Users app and open the record for Patron 1, and open the patron's open loans
- Select the newly created loan and renew the item twice
Expected Results:
When the second renewal is attempted an error popup is shown and the backend sends a 422 HTTP status code with JSON including the "code" property:
{ "errors" : [ { "code" : "[CODE HERE]" "message" : "loan at maximum renewal number", "parameters" : [ { "key" : "loanPolicyName", "value" : "Example Loan Policy" }, { "key" : "loanPolicyId", "value" : "d9cd0bed-1b49-4b5e-a7bd-064b8d177231" } ], "overridableBlock" : { "name" : "renewalBlock", "missingPermissions" : [ ] } } ] }
Actual Results:
The "code" property defined in the error.schema is missing:
https://github.com/folio-org/raml/blob/raml1.0/schemas/error.schema
{ "errors" : [ { "message" : "loan at maximum renewal number", "parameters" : [ { "key" : "loanPolicyName", "value" : "Example Loan Policy" }, { "key" : "loanPolicyId", "value" : "d9cd0bed-1b49-4b5e-a7bd-064b8d177231" } ], "overridableBlock" : { "name" : "renewalBlock", "missingPermissions" : [ ] } } ] }
Additional Information:
- The code property is not included in any circulation/renew-by-barcode responses with a 422 status code. These other cases will likely need separate tickets created.
- I am not certain that there are existing error codes that should be included in these responses.
TestRail: Results
Attachments
Issue Links
- has to be done after
-
FOLIO-1716 Uniquely identify backend API validation errors
-
- Closed
-