I am trying to send more than 1000 messages. The problem happens in the twilio catch: when an error returns, the loop breaks and does not continue to advance. How can I keep the loop running and thus ensure the sending of all messages? 

```
try {
        const targets: TargetSms[] = data.targets;
        const rbd = data.rbd;
        const idMessage = data.idMessage;

        const messageRef =  admin.firestore().collection(`/RBD/${rbd}/messages`).doc(idMessage);
        await messageRef.set({ serverResponse: true }, { merge: true });

        let countSeg = 0;
        for (const target of targets) {
            if (target.messagePayload) return target;
            const textMessage = {
                body: target.plainMsg,
                to: target.targetNumber,  // Text to this number
                from: twilioNumber, // From a valid Twilio number
            };

            const payloadMessage  = await client.messages
                .create(textMessage)
                .then(mess => mess)
                .catch(err => {
                    console.warn('ocurrio un error al enviar mensaje', err)
                    target.messageError = err;
                    return null;
                });

                if(payloadMessage){
                    countSeg = countSeg + parseInt(payloadMessage.numSegments);
                    target.messagePayload = JSON.parse(JSON.stringify(new MessagePayload(payloadMessage)));
                }
            await admin.firestore().collection(`/RBD/${rbd}/targets`).doc(target.id).set(target);
            await timeout(100);
        };

        await messageRef.set({totalSegments:countSeg},{merge:true});
        await admin.firestore().doc(`/RBD/${rbd}`).set({config: {"countSms": admin.firestore.FieldValue.increment(countSeg)}},{merge:true});

        return JSON.stringify({ suss: true, message: 'Mensajes enviados' })

    } catch (error) {
        return JSON.stringify({ suss: false, message: error })
    }

```