Skip to content

Commit

Permalink
catch twilio error
Browse files Browse the repository at this point in the history
  • Loading branch information
n13 committed Oct 6, 2024
1 parent 6061695 commit 0358c56
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/pangea-testnet-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ env:
sendGridKey: ${{ secrets.SENDGRID_KEY }}
twilioAccountSid: ${{ secrets.TWILIO_ACCOUNT_SID }}
twilioAuthToken: ${{ secrets.TWILIO_AUTH_TOKEN }}
disableTwilio: true
eosHistoryEndpoint: ${{vars.HISTORY_ENDPOINT}}
eosHttpEndpoint: ${{vars.HTTP_ENDPOINT}}
authVerifier: TABLE
Expand Down
6 changes: 5 additions & 1 deletion service/CommApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ class CommApi {
constructor() {
const accountSid = process.env.twilioAccountSid; // Your Account SID from www.twilio.com/console
const authToken = process.env.twilioAuthToken; // Your Auth Token from www.twilio.com/console
this.twilio = new twilio(accountSid, authToken);
try {
this.twilio = new twilio(accountSid, authToken);
} catch (error) {
console.error("Twilio exception " + error + " accountSid " + accountSid);
}
}

async sendEmail(emailAddress, subject, message) {
Expand Down

0 comments on commit 0358c56

Please sign in to comment.