Uploaded image for project: 'ui-inventory'
  1. ui-inventory
  2. UIIN-321

Instances with non-existing language codes crashes the instance view

    XMLWordPrintable

Details

    • Prokopovych

    Description

      Overview:

      Steps to Reproduce:

      1. Post an Instance to /instance-storage/instances that has a language code that is non-existant, like "mylang"
      2. lookup that record in the ui by going to /inventory/view/ {InstanceId}

      Expected Results:
      I am not sure. If the correct language code is needed, then the record should not be added in the first place. But given the state of the backend,* perhaps a more graceful error message would be a good start*.

      Actual Results:
      A UI crash. See attachment.

      Additional Information:
      This record had been checked towards the JSON schema, before they were posted, but language codes are not part of that. Is there a way to add that so you could do the checks before posting?

      Test data:
      ??{
      "instanceTypeId": "d02e6f4b-be20-44eb-b500-daa49eef0c3a",
      "physicalDescriptions": ["pd1", "pd2"],
      "source": "chalmers_dump",
      "id": "8c175ada-0a78-4799-a7e7-fff8d803b90f",
      "notes": ["note1", "note2"],
      "contributors": [

      { "primary": true, "contributorNameTypeId": "2b94c631-fca9-a892-c730-03ee529ffe2a", "contributorTypeText": "Personal name", "name": "Hordeski, Michael F." }

      ],
      "title": "Troubleshooting and repairing PCs : beyond the basics",
      "urls": ["http://dn.se", "https://svd.se"],
      "instanceFormatId": "4eba6d19-5fef-4d2f-a6da-9f2176ccf851",
      "languages": ["mylang"],
      "identifiers": [

      { "value": "0070305560", "identifierTypeId": "913300b2-03ed-469a-8179-c1092c991227" }

      ,

      { "value": "0-07-030555-2", "identifierTypeId": "8261054f-be78-422d-bd51-4ed9f33c3422" }

      ],
      "publication": [

      { "dateOfPublication": "c", "place": "b", "publisher": "a" }

      ],
      "series": ["Series 1", "Series 2"],
      "subjects": ["Subject 1", "Subject 2"],
      "alternativeTitles": ["Alternative title1", "Alternative title 2"],
      "edition": "Edition"
      }??

      Interested parties:

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                ttolstoy Theodor (EBSCO)
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases