diff --git a/functions/transferChatStart.ts b/functions/transferChatStart.ts index f590eeb6..06a5344d 100644 --- a/functions/transferChatStart.ts +++ b/functions/transferChatStart.ts @@ -359,10 +359,10 @@ export const handler = TokenValidator( }); newTaskSid = newTask.sid; - } - // Increse the chat capacity for the target worker (if needed) - await increaseChatCapacity(context, validationResult); + // Increse the chat capacity for the target worker (if needed) + await increaseChatCapacity(context, validationResult); + } resolve(success({ taskSid: newTaskSid })); } catch (err: any) {