Skip to content

Fix resolver-validation validation snake trap #12850

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

Merged
merged 4 commits into from
Jun 24, 2025
Merged

Conversation

prastoin
Copy link
Contributor

@prastoin prastoin commented Jun 24, 2025

Introduction

This PR might have a lot of impact on tested validation
Avoid catching programmatically thrown error

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Enhanced GraphQL resolver validation pipe to prevent validation errors from causing silent failures, focusing on safer error handling and improved validation flow.

  • Added safeClassValidatorValidateWrapper function in resolver-validation.pipe.ts to handle validation errors gracefully instead of silently failing
  • Streamlined validation flow by removing nested try-catch blocks for better error tracking
  • Fixed potential snake trap where validation errors were being swallowed by returning original values without proper error handling

1 file reviewed, 1 comment
Edit PR Review Bot Settings | Greptile

Copy link
Contributor

github-actions bot commented Jun 24, 2025

🚀 Preview Environment Ready!

Your preview environment is available at: http://bore.pub:60122

This environment will automatically shut down when the PR is closed or after 5 hours.

@prastoin prastoin changed the title Fix resolver-validation validation snake trap Fix resolver-validation validation snake trap Jun 24, 2025
@charlesBochet charlesBochet merged commit b31845b into main Jun 24, 2025
42 checks passed
@charlesBochet charlesBochet deleted the fix-validation-schema branch June 24, 2025 16:30
abdulrahmancodes pushed a commit to abdulrahmancodes/twenty that referenced this pull request Jun 26, 2025
# Introduction
This PR might have a lot of impact on tested validation
Avoid catching programmatically thrown error

---------

Co-authored-by: Charles Bochet <[email protected]>
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.

3 participants