Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(graphql): emit notifications on server error response #1218

Merged
merged 2 commits into from
Feb 29, 2024

Conversation

andrewazores
Copy link
Member

@andrewazores andrewazores commented Feb 29, 2024

Welcome to Cryostat! 👋

Before contributing, make sure you have:

  • Read the contributing guidelines
  • Linked a relevant issue which this PR resolves
  • Linked any other relevant issues, PR's, or documentation, if any
  • Resolved all conflicts, if any
  • Rebased your branch PR on top of the latest upstream main branch
  • Attached at least one of the following labels to the PR: [chore, ci, docs, feat, fix, test]
  • Signed all commits using a GPG signature

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


Related to #65
Related to #410
Related to cryostatio/cryostat#11

Description of the change:

GraphQL queries which do not explicitly suppress notifications will emit a graphical notification box if there are GraphQL errors in the response.

Motivation for the change:

Previously, notifications would only be displayed if the GraphQL response status code was 4xx/5xx. With this change, 2xx responses which contain a GraphQL error response will also display notifications. This provides the user (or developer) more information about what went wrong with the request.

How to manually test:

  1. Run CRYOSTAT_IMAGE=quay.io... sh smoketest.sh...
  2. ...

@andrewazores
Copy link
Member Author

Useful when doing work like in cryostatio/cryostat#307 .

@andrewazores andrewazores marked this pull request as ready for review February 29, 2024 04:48
@andrewazores
Copy link
Member Author

Example:
image

@andrewazores andrewazores merged commit 947a706 into cryostatio:main Feb 29, 2024
21 checks passed
@andrewazores andrewazores deleted the graphql-errors branch February 29, 2024 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants