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
@@ -0,0 +1,19 @@
import { assertUnreachable } from 'twenty-shared/utils';
import { ForbiddenError } from 'src/engine/core-modules/graphql/utils/graphql-errors.util';
import {
type WorkflowQueryValidationException,
WorkflowQueryValidationExceptionCode,
} from 'src/modules/workflow/common/exceptions/workflow-query-validation.exception';
export const workflowQueryValidationGraphqlApiExceptionHandler = (
exception: WorkflowQueryValidationException,
) => {
switch (exception.code) {
case WorkflowQueryValidationExceptionCode.FORBIDDEN:
throw new ForbiddenError(exception);
default: {
assertUnreachable(exception.code);
}
}
};
@@ -55,7 +55,7 @@ export class IteratorWorkflowAction implements WorkflowActionInterface {
if (!Array.isArray(parsedItems)) {
throw new WorkflowStepExecutorException(
'Iterator input items must be an array',
WorkflowStepExecutorExceptionCode.INTERNAL_ERROR,
WorkflowStepExecutorExceptionCode.INVALID_STEP_INPUT,
);
}