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

    • Template:
    • Sprint:
      eHoldings Sprint 40
    • Story Points:
      3
    • Back End Estimate:
      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

            Issue Links

              Activity

                People

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

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases