Uploaded image for project: 'ERM Platform'
  1. ERM Platform
  2. ERM-2174

Invalid JSON returned for some entitlementOptions

    XMLWordPrintable

Details

    • ERM Sprint 140, ERM Sprint 141, ERM Sprint 142
    • Bienenvolk
    • Morning Glory (R2 2022)
    • TBD

    Description

      Overview:
      Some calls for entitlementOptions are returning invalid JSON

      Steps to Reproduce:
      e.g. make a call to entitlementOptions:

      curl 'https://folio-snapshot-okapi.dev.folio.org/erm/resource/16b61d1d-cac1-4050-aece-e3737a46bcf0/entitlementOptions?stats=true&perPage=10&offset=0' \
        -H 'authority: folio-snapshot-okapi.dev.folio.org' \
        -H 'accept: application/json' \
        -H 'accept-language: en-US' \
        -H 'origin: https://folio-snapshot.dev.folio.org' \
        -H 'referer: https://folio-snapshot.dev.folio.org/' \
        -H 'sec-fetch-mode: cors' \
        -H 'sec-fetch-site: same-site' \
        -H 'x-okapi-tenant: diku' \
        -H 'x-okapi-token: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJkaWt1X2FkbWluIiwidHlwZSI6ImxlZ2FjeS1hY2Nlc3MiLCJ1c2VyX2lkIjoiYWMwYjlhMDYtNTYxNS01MDE5LWE3MjAtMWFjNWViNGJhYTBjIiwiaWF0IjoxNjUyOTQ5MDI1LCJ0ZW5hbnQiOiJkaWt1In0.K6Z_1Yya00XBmFh5vIetsl2odAqDt_KzIvWjGWZ4QF0' \
        --compressed
      

      Examine JSON response and see that there is an omitted comma that makes the JSON invalid
      The invalid code is in the `_object` object - the `pti` object is closed by a } which is then followed immediately with "dateCreated" with no separating comma - which is invalid.

      {
        "pageSize": 10,
        "page": 1,
        "totalPages": 1,
        "meta": {},
        "totalRecords": 2,
        "total": 2,
        "results": [
          {
            "id": "952fc9f3-1ebf-48b2-926b-5b1d6fc97866",
            "class": "org.olf.kb.Pkg",
            "name": "Edward Elgar:Edward Elgar E-Book Archive in Business & Management, Economics and Finance:Nationallizenz",
            "suppressFromDiscovery": false,
            "tags": [],
            "alternateResourceNames": [],
            "customCoverage": false,
            "_object": {
              "id": "952fc9f3-1ebf-48b2-926b-5b1d6fc97866",
              "dateCreated": "2022-05-19T02:07:23Z",
              "packageDescriptionUrls": [],
              "tags": [],
              "lastUpdated": "2022-05-19T02:07:23Z",
              "normalizedName": "edward elgar:edward elgar e-book archive in business & management, economics and finance:nationallizenz",
              "vendor": {
                "id": "dbc0c21d-fd03-46a6-b0ec-3608d1307b41",
                "name": "Edward Elgar",
                "orgsUuid_object": {
                  "error": 400,
                  "message": "Bad Request"
                }
              },
              "coverage": [],
              "source": "GOKb",
              "remoteKb": {
                "id": "c6b0f66f-5eea-4d5e-bd70-cd4f9eccda78",
                "cursor": "2022-04-06T16:31:59Z",
                "active": true,
                "trustedSourceTI": false,
                "activationEnabled": false,
                "readonly": false,
                "syncStatus": "idle",
                "lastCheck": 1652946359294,
                "name": "GOKb_TEST",
                "type": "org.olf.kb.adapters.GOKbOAIAdapter",
                "fullPrefix": "gokb",
                "uri": "https://gokbt.gbv.de/gokb/oai/index",
                "supportsHarvesting": true,
                "rectype": 1
              },
              "contentTypes": [],
              "alternateResourceNames": [],
              "name": "Edward Elgar:Edward Elgar E-Book Archive in Business & Management, Economics and Finance:Nationallizenz",
              "suppressFromDiscovery": false,
              "reference": "Edward_Elgar:Edward_Elgar_E-Book_Archive_in_Business_&_Management,_Economics_and_Finance:Nationalliz",
              "resourceCount": 2540,
              "class": "org.olf.kb.Pkg",
              "identifiers": [
                {
                  "dateCreated": "2022-05-19T02:07:23Z",
                  "lastUpdated": "2022-05-19T02:07:23Z",
                  "status": {
                    "id": "2c91809c80d9fd2c0180da03db1f006b",
                    "value": "approved",
                    "label": "approved"
                  },
                  "identifier": {
                    "value": "ZDB-1-EWE",
                    "ns": {
                      "value": "isil"
                    }
                  }
                }
              ]
            }
          },
          {
            "id": "ef0e242f-051d-4c53-9d17-e2fd993b87cb",
            "class": "org.olf.kb.PackageContentItem",
            "name": "'\"Institutions, industrial upgrading, and economic performance in Ja...' on Platform 'Elgaronline' in Package Edward Elgar:Edward Elgar E-Book Archive in Business & Management, ...",
            "suppressFromDiscovery": false,
            "tags": [],
            "alternateResourceNames": [],
            "customCoverage": false,
            "_object": {
              "id": "ef0e242f-051d-4c53-9d17-e2fd993b87cb",
              "accessStart": "2008-01-01",
              "dateCreated": "2022-05-19T02:09:00Z",
              "tags": [],
              "matchKeys": [
                {
                  "value": "9781845425678",
                  "key": "electronic_isbn"
                },
                {
                  "value": "\"Institutions, industrial upgrading, and economic performance in Japan: the 'flying-geese' paradigm of catch-up growth\"",
                  "key": "title_string"
                }
              ],
              "lastUpdated": "2022-05-19T02:07:23Z",
              "depth": "Fulltext",
              "coverage": [],
              "pti": {
                "id": "a8162287-bff1-44ea-90f8-693c7ad62346",
                "dateCreated": "2022-05-19T02:09:00Z",
                "tags": [],
                "matchKeys": [
                  {
                    "value": "9781845425678",
                    "key": "electronic_isbn"
                  },
                  {
                    "value": "\"Institutions, industrial upgrading, and economic performance in Japan: the 'flying-geese' paradigm of catch-up growth\"",
                    "key": "title_string"
                  }
                ],
                "lastUpdated": "2022-05-19T02:09:00Z",
                "platform": {
                  "id": "93a416a9-7436-489a-a751-29603d1d6817",
                  "dateCreated": "2022-05-19T02:07:23Z",
                  "lastUpdated": "2022-05-19T02:07:23Z",
                  "name": "Elgaronline",
                  "locators": [
                    {
                      "id": "6db34ba9-6a5e-494d-8d4f-9dc31a68d61b",
                      "domainName": "www.elgaronline.com"
                    }
                  ]
                },
                "templatedUrls": [
                  {
                    "id": "1c601b47-f7f2-4779-9c32-b94939b5d40b",
                    "url": "https://www.elgaronline.com/view/9781843769590.xml",
                    "name": "defaultUrl",
                    "resource": {
                      "id": "a8162287-bff1-44ea-90f8-693c7ad62346"
                    }
                  }
                ],
                "coverage": [],
                "titleInstance": {
                  "id": "16b61d1d-cac1-4050-aece-e3737a46bcf0",
                  "subType": {
                    "id": "2c91809c80d9fd2c0180da03d209004c",
                    "value": "electronic",
                    "label": "Electronic"
                  },
                  "dateCreated": "2022-05-19T02:09:00Z",
                  "tags": [],
                  "lastUpdated": "2022-05-19T02:09:00Z",
                  "normalizedName": "\"institutions, industrial upgrading, and economic performance in japan: the 'flying-geese' paradigm of catch-up growth\"",
                  "publicationType": {
                    "id": "2c91809c80d9fd2c0180da03e50d006c",
                    "value": "book",
                    "label": "Book"
                  },
                  "coverage": [],
                  "name": "\"Institutions, industrial upgrading, and economic performance in Japan: the 'flying-geese' paradigm of catch-up growth\"",
                  "type": {
                    "id": "2c91809c80d9fd2c0180da03d20e004e",
                    "value": "monograph",
                    "label": "Monograph"
                  },
                  "suppressFromDiscovery": false,
                  "work": {
                    "id": "ebd5c023-f029-4889-a29c-e68ca2c4e95f"
                  },
                  "class": "org.olf.kb.TitleInstance",
                  "longName": "\"Institutions, industrial upgrading, and economic performance in Japan: the 'flying-geese' paradigm of catch-up growth\"",
                  "identifiers": [
                    {
                      "dateCreated": "2022-05-19T02:09:00Z",
                      "lastUpdated": "2022-05-19T02:09:00Z",
                      "status": {
                        "id": "2c91809c80d9fd2c0180da03db1f006b",
                        "value": "approved",
                        "label": "approved"
                      },
                      "identifier": {
                        "value": "9781845425678",
                        "ns": {
                          "value": "isbn"
                        }
                      }
                    }
                  ],
                  "relatedTitles": []
                },
                "url": "https://www.elgaronline.com/view/9781843769590.xml",
                "name": "'\"Institutions, industrial upgrading, and economic performance in Japan: the 'flying-geese' paradigm of catc...' on Platform 'Elgaronline'",
                "suppressFromDiscovery": false,
                "class": "org.olf.kb.PlatformTitleInstance",
                "longName": "'\"Institutions, industrial upgrading, and economic performance in Japan: the 'flying-geese' paradigm of catch-up growth\"' on Platform 'Elgaronline'"
              }"dateCreated": "2022-05-19T02:07:23Z",
              "status": {
                "id": "2c91809c80d9fd2c0180da03db1f006b",
                "value": "approved",
                "label": "approved"
              },
              "identifier": {
                "value": "ZDB-1-EWE",
                "ns": {
                  "value": "isil"
                }
              },
              "pkg": {
                "id": "952fc9f3-1ebf-48b2-926b-5b1d6fc97866",
                "dateCreated": "2022-05-19T02:07:23Z",
                "packageDescriptionUrls": [],
                "tags": [],
                "lastUpdated": "2022-05-19T02:07:23Z",
                "normalizedName": "edward elgar:edward elgar e-book archive in business & management, economics and finance:nationallizenz",
                "vendor": {
                  "id": "dbc0c21d-fd03-46a6-b0ec-3608d1307b41",
                  "name": "Edward Elgar",
                  "orgsUuid_object": {
                    "error": 400,
                    "message": "Bad Request"
                  }
                },
                "identifiers": [
                  {}
                ],
                "coverage": [],
                "source": "GOKb",
                "remoteKb": {
                  "id": "c6b0f66f-5eea-4d5e-bd70-cd4f9eccda78",
                  "cursor": "2022-04-06T16:31:59Z",
                  "active": true,
                  "trustedSourceTI": false,
                  "activationEnabled": false,
                  "readonly": false,
                  "syncStatus": "idle",
                  "lastCheck": 1652946359294,
                  "name": "GOKb_TEST",
                  "type": "org.olf.kb.adapters.GOKbOAIAdapter",
                  "fullPrefix": "gokb",
                  "uri": "https://gokbt.gbv.de/gokb/oai/index",
                  "supportsHarvesting": true,
                  "rectype": 1
                },
                "contentTypes": [],
                "alternateResourceNames": [],
                "name": "Edward Elgar:Edward Elgar E-Book Archive in Business & Management, Economics and Finance:Nationallizenz",
                "suppressFromDiscovery": false,
                "reference": "Edward_Elgar:Edward_Elgar_E-Book_Archive_in_Business_&_Management,_Economics_and_Finance:Nationalliz",
                "resourceCount": 2540,
                "class": "org.olf.kb.Pkg"
              },
              "addedTimestamp": 1652926043342,
              "accessEnd": "2021-03-31",
              "alternateResourceNames": [],
              "name": "'\"Institutions, industrial upgrading, and economic performance in Ja...' on Platform 'Elgaronline' in Package Edward Elgar:Edward Elgar E-Book Archive in Business & Management, ...",
              "lastSeenTimestamp": 1652926043342,
              "suppressFromDiscovery": false,
              "longName": "'\"Institutions, industrial upgrading, and economic performance in Japan: the 'flying-geese' paradigm of catch-up growth\"' on Platform 'Elgaronline' in Package Edward Elgar:Edward Elgar E-Book Archive in Business & Management, Economics and Finance:Nationallizenz",
              "class": "org.olf.kb.PackageContentItem"
            }
          }
        ]
      }
      

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                ostephens Owen Stephens
                ostephens Owen Stephens
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases