feat: promise safety with eslint

This commit is contained in:
Mythie
2023-08-29 13:01:19 +10:00
parent ba054ae915
commit ca40e983e3
35 changed files with 103 additions and 57 deletions

View File

@ -110,9 +110,10 @@ export class MailChannelsTransport implements Transport<SentMessageInfo> {
});
}
res.json().then((data) => {
return callback(new Error(`MailChannels error: ${data.message}`), null);
});
res
.json()
.then((data) => callback(new Error(`MailChannels error: ${data.message}`), null))
.catch((err) => callback(err, null));
})
.catch((err) => {
return callback(err, null);