Merge pull request #323 from documenso/feat/promise-safety

feat: promise safety
This commit is contained in:
Lucas Smith
2023-08-30 11:32:32 +10:00
committed by GitHub
35 changed files with 103 additions and 57 deletions
+4 -3
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);