Uploaded image for project: 'ui-users'
  1. ui-users
  2. UIU-977

renewal failure messages are not internationalized

    XMLWordPrintable

    Details

    • Template:
    • Development Team:
      Prokopovych

      Description

      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.

       

      Example:

      The backend sends a 422 HTTP status code with this JSON:

      {
        "errors" : [ {
          "message" : "This requester currently has this item on loan.",
          "parameters" : [ {
            "key" : "itemId",
            "value" : "7212ba6a-8dcf-45a1-be9a-ffaa847c4423"
          }, {
            "key" : "userId",
            "value" : "b4cee18d-f862-4ef1-95a5-879fdd619603"
          }, {
            "key" : "loanId",
            "value" : "38c377d0-842f-4c59-952f-b56635445cd5"
          } ]
        } ]
      }

      The "code" property defined in the error.schema is missing:
      https://github.com/folio-org/raml/blob/raml1.0/schemas/error.schema

      {
        "errors" : [ {
          "code" : "mod-circulation.errors.requesterHasItemOnLoan",
          "message" : "This requester currently has this item on loan.",
          "parameters" : [ {
            "key" : "itemId",
            "value" : "7212ba6a-8dcf-45a1-be9a-ffaa847c4423"
          }, {
            "key" : "userId",
            "value" : "b4cee18d-f862-4ef1-95a5-879fdd619603"
          }, {
            "key" : "loanId",
            "value" : "38c377d0-842f-4c59-952f-b56635445cd5"
          } ]
        } ]
      }

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                Unassigned Unassigned
                Reporter:
                zburke Zak_Burke
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:

                    TestRail: Runs

                      TestRail: Cases