Check workflow version is valid before publishing (#6702)
Fix https://github.com/twentyhq/twenty/issues/6670
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user