Check workflow version is valid before publishing (#6702)

Fix https://github.com/twentyhq/twenty/issues/6670
This commit is contained in:
Thomas Trompette
2024-08-21 17:56:33 +02:00
committed by GitHub
parent 663acd56e4
commit be50a6256f
4 changed files with 73 additions and 11 deletions

View File

@ -16,10 +16,10 @@ export class WorkflowTriggerGraphqlApiExceptionFilter
catch(exception: WorkflowTriggerException) {
switch (exception.code) {
case WorkflowTriggerExceptionCode.INVALID_INPUT:
throw new UserInputError(exception.message);
case WorkflowTriggerExceptionCode.INVALID_WORKFLOW_TRIGGER:
case WorkflowTriggerExceptionCode.INVALID_WORKFLOW_VERSION:
case WorkflowTriggerExceptionCode.INVALID_ACTION_TYPE:
case WorkflowTriggerExceptionCode.INVALID_WORKFLOW_TRIGGER:
throw new UserInputError(exception.message);
default:
throw new InternalServerError(exception.message);
}