NagVis KeyError in api_request["type"] == "table":

CMK version: 2.3.p31
OS version: Docker Container

Symptom: NagVis maps snap-in: Failed to update NagVis maps: 500

Error message:
Traceback:

  File "/omd/sites/cmk/lib/python3/cmk/gui/wsgi/applications/checkmk.py", line 188, in _process_request
    resp = page_handler()
  File "/omd/sites/cmk/lib/python3/cmk/gui/wsgi/applications/utils.py", line 113, in _call_auth
    func()
  File "/omd/sites/cmk/lib/python3/cmk/gui/pages.py", line 187, in wrapper
    return hc().handle_page()
  File "/omd/sites/cmk/lib/python3/cmk/gui/pages.py", line 51, in handle_page
    self.page()
  File "/omd/sites/cmk/lib/python3/cmk/gui/pages.py", line 146, in <lambda>
    "page": lambda self: self._wrapped_callable[0](),
  File "/omd/sites/cmk/lib/python3/cmk/gui/sidebar/_snapin/_nagvis_maps.py", line 43, in _ajax_show_nagvis_maps_snapin
    if api_request["type"] == "table":

We have a fairly old instance of enterprise check-mk running that has gone through a few upgrades. I have tried looking for php errors as specifed in the help pages on this topic to no avail. Then above is seen in web.log as well as the crash report window.