Skip to content

Commit

Permalink
throw error when chunk request aborted
Browse files Browse the repository at this point in the history
  • Loading branch information
f-w committed Jun 21, 2021
1 parent 57f18c5 commit 89252a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/controllers/notification.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ export class NotificationController extends BaseController {
switch (e.channel) {
case 'sms':
try {
if (this.chunkRequestAborted) return;
if (this.chunkRequestAborted) throw new HttpErrors[500]();
await this.sendSMS(e.userChannelId, textBody, e);
return await notificationMsgCB(null, e);
} catch (ex) {
Expand Down Expand Up @@ -702,7 +702,7 @@ export class NotificationController extends BaseController {
};
}
try {
if (this.chunkRequestAborted) return;
if (this.chunkRequestAborted) throw new HttpErrors[500]();
await this.sendEmail(mailOptions);
return await notificationMsgCB(null, e);
} catch (ex) {
Expand Down

0 comments on commit 89252a3

Please sign in to comment.