Clean workflow query invalid input errors from sentry (#18804)

As title
This commit is contained in:
Thomas Trompette
2026-03-20 17:12:25 +01:00
committed by GitHub
parent 3d49c21b51
commit a8625d8bfb
3 changed files with 24 additions and 1 deletions
@@ -20,6 +20,8 @@ import { PermissionsException } from 'src/engine/metadata-modules/permissions/pe
import { permissionGraphqlApiExceptionHandler } from 'src/engine/metadata-modules/permissions/utils/permission-graphql-api-exception-handler.util';
import { TwentyORMException } from 'src/engine/twenty-orm/exceptions/twenty-orm.exception';
import { twentyORMGraphqlApiExceptionHandler } from 'src/engine/twenty-orm/utils/twenty-orm-graphql-api-exception-handler.util';
import { WorkflowQueryValidationException } from 'src/modules/workflow/common/exceptions/workflow-query-validation.exception';
import { workflowQueryValidationGraphqlApiExceptionHandler } from 'src/modules/workflow/common/utils/workflow-query-validation-graphql-api-exception-handler.util';
interface QueryFailedErrorWithCode extends QueryFailedError {
code: string;
@@ -49,6 +51,8 @@ export const workspaceQueryRunnerGraphqlApiExceptionHandler = (
return throttlerToGraphqlApiExceptionHandler(error);
case error instanceof GraphqlDirectExecutionException:
return graphqlDirectExecutionToGraphqlApiExceptionHandler(error);
case error instanceof WorkflowQueryValidationException:
return workflowQueryValidationGraphqlApiExceptionHandler(error);
default:
throw error;
}