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

Don't crash when a GraphQL-requested workspace (with the random argument) doesn't exist #2213

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

caiosba
Copy link
Contributor

@caiosba caiosba commented Feb 11, 2025

Description

Don't crash when a GraphQL-requested workspace (with the random argument) doesn't exist.

Reported by Sentry.

Fixes: CV2-6151.

How has this been tested?

TDD. Reproduced in a unit test that passed after the fix:

Failure:
GraphqlController11Test#test_should_not_crash_if_workspace_doesn't_exist [test/controllers/graphql_controller_11_test.rb:397]:
Expected response to be a <2XX: success>, but was a <400: Bad Request>
Response body: {"errors":[{"message":"undefined method `reload' for nil:NilClass","code":5,"data":{}}]}

Checklist

  • I have performed a self-review of my own code
  • I have added unit and feature tests, if the PR implements a new feature or otherwise would benefit from additional testing
  • I have added regression tests, if the PR fixes a bug
  • I have added logging, exception reporting, and custom tracing with any additional information required for debugging
  • I considered secure coding practices when writing this code. Any security concerns are noted above.
  • I have commented my code in hard-to-understand areas, if any
  • I have made needed changes to the README
  • My changes generate no new warnings
  • If I added a third party module, I included a rationale for doing so and followed our current guidelines

…ment doesn't exist.

Reported by Sentry.

Fixes: CV2-6151.
@caiosba caiosba merged commit f7ca752 into develop Feb 11, 2025
10 of 11 checks passed
@caiosba caiosba deleted the fix/CV2-6151-team-random-crash branch February 11, 2025 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants