We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14ed0c7 commit 9ad28faCopy full SHA for 9ad28fa
lib/messenger-clients/SMSEnvoiClient.ts
@@ -84,17 +84,22 @@ export class SMSEnvoiClient extends MessengerClient<SMSEnvoiAccount> {
84
const payload = {
85
message_type: "PRM",
86
message: sms.body,
87
- recipient: sms.to,
+ recipient: [sms.to],
88
returnCredits: true,
89
+ sender: sms.from,
90
};
91
- const response = await axios.post(
92
- "https://api.smsenvoi.com/API/v1.0/REST/sms",
93
- payload,
94
- { headers },
95
- );
+ try {
+ const response = await axios.post(
+ "https://api.smsenvoi.com/API/v1.0/REST/sms",
+ payload,
96
+ { headers },
97
+ );
98
- return response.data;
99
+ return response.data;
100
+ } catch (e) {
101
+ throw Error(e.resonse.data.result);
102
+ }
103
}
104
105
0 commit comments