Details
-
Bug
-
Status: Closed (View Workflow)
-
P4
-
Resolution: Won't Do
-
None
-
None
-
-
Prokopovych
Description
Overview:
Steps to Reproduce:
- Post an Instance to /instance-storage/instances that has a language code that is non-existant, like "mylang"
- 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": [
],
"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": "0-07-030555-2", "identifierTypeId": "8261054f-be78-422d-bd51-4ed9f33c3422" }],
"publication": [
],
"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
- relates to
-
FOLIO-1299 Add valid language codes as an enum to Instance record JSON Schema
-
- Open
-