Uploaded image for project: 'ui-eholdings'
  1. ui-eholdings
  2. UIEH-369

BUG: Package Create: Package with Duplicate Name does not give descriptive error message

    XMLWordPrintable

Details

    • eHoldings Sprint 40
    • 3
    • Small < 3 days

    Description

      Attempt to create a new package with the same name as an already existing package (for example - 'caroles custom package'

      You see an error message "An Unknown error occurred"

      The message should give more information as is available from rm api

      Here is the request and response to/from mod-kb-ebsco

      POST https://okapi.frontside.io/eholdings/packages
      

      Body

      {"data":{"type":"packages","attributes":{"name":"caroles custom package","contentType":""}}}
      

      Response

      {"errors":[{"title":""}],"jsonapi":{"version":"1.0"}}
      

      RM API provides an error message such as below when this happens;

      {"errors":[{"code":1009,"subCode":0,"message":"Custom Package with
              the provided name already exists"}]}
      

      This is also visible in the vcr recording for unit test
      https://github.com/folio-org/mod-kb-ebsco/blob/master/spec/fixtures/vcr_cassettes/post-custom-package-taken-name.yml

      TestRail: Results

        Attachments

          1. 2018-05-31 09.12.19.gif
            223 kB
            Charles Lowell
          2. 2018-05-31 11.21.32.gif
            251 kB
            Carole Godfrey

          Issue Links

            Activity

              People

                sduvvuri Sobha Duvvuri
                cgodfrey Carole Godfrey
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases