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

Attempt to GET "undefined" on creating a widget

    XMLWordPrintable

Details

    • ERM Sprint 117
    • Bienenvolk

    Description

      Overview:

      In console when creating a simple search widget instance on the dashboard, when the widget is saved there is a GET to /servint/widgets/instances/undefined

      curl 'https://folio-snapshot-okapi.dev.folio.org/servint/widgets/instances/undefined' \
        -H 'authority: folio-snapshot-okapi.dev.folio.org' \
        -H 'accept: application/json' \
        -H 'x-okapi-tenant: diku' \
        -H 'x-okapi-token: <token>' \
        -H 'origin: https://folio-snapshot.dev.folio.org' \
        -H 'sec-fetch-site: same-site' \
        -H 'sec-fetch-mode: cors' \
        -H 'sec-fetch-dest: empty' \
        -H 'referer: https://folio-snapshot.dev.folio.org/' \
        -H 'accept-language: en,en-US;q=0.9,en-GB;q=0.8' \
        --compressed

      This results in a 403 response

      {
        "timestamp": 1622026677394,
        "status": 403,
        "error": "Forbidden",
        "message": "Forbidden",
        "path": "/servint/widgets/instances/undefined"
      }
      
      

      Dev task breakdown

      • I expect a combination of this and this are causing this behaviour
      • Need to ensure we aren't getting memoized version on next edit (Whatever the solution)
      • Check removing from 'post' is sufficient, and that that doesn't cause unwanted behaviour on next edit(s)
        • Will need testing with a single widget, and also editing another widget after posting

       

      • If unwanted behaviour occurs, will perhaps need state variable containing `params.id` || id gained from post, with that replacing the last variable in the fetch.
      • Hopefully won't be needed, as that would be messy

      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