cryostatio / cryostat-web

Web front-end for Cryostat: Secure JDK Flight Recorder management for containerized JVMs
https://cryostat.io/
Other
10 stars 20 forks source link

fix(graphql): handle nullable response fields that can occur when there are server errors #1246

Closed andrewazores closed 4 months ago

andrewazores commented 4 months ago

Welcome to Cryostat! 👋

Before contributing, make sure you have:

To recreate commits with GPG signature git fetch upstream && git rebase --force --gpg-sign upstream/main


See https://github.com/cryostatio/cryostat3/issues/389 Based on #1245

Description of the change:

Adds handling of potentially null/undefined GraphQL API response fields.

Motivation for the change:

GraphQL responses may contain null/undefined fields when execution errors occurred. Notification popups appear to inform the user of these errors, but the views invoking these API calls should not render an overall broken error view state. It's better to render what content was available from the response, if any, rather than an overall broken view when only some subset of the data may not be available.

How to manually test:

  1. Run CRYOSTAT_IMAGE=quay.io... sh smoketest.sh...
  2. ...
github-actions[bot] commented 4 months ago

This PR/issue depends on: