Investigate SMS delivery failure
The application reports successful message sending, but the user did not receive an SMS. Further investigation is needed to determine the cause of the delivery failure.
This commit is contained in:
parent
777409e6cc
commit
c4d3c70f8c
|
@ -41,6 +41,21 @@ export function MessageComposer() {
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('Message stored successfully:', data);
|
console.log('Message stored successfully:', data);
|
||||||
|
|
||||||
|
// Call the Edge Function to send SMS
|
||||||
|
const { data: smsResponse, error: smsError } = await supabase.functions.invoke('send-sms', {
|
||||||
|
body: {
|
||||||
|
phoneNumber: formattedPhoneNumber,
|
||||||
|
message: message
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (smsError) {
|
||||||
|
console.error('SMS sending error:', smsError);
|
||||||
|
throw smsError;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('SMS sent successfully:', smsResponse);
|
||||||
toast.success("Message sent successfully!");
|
toast.success("Message sent successfully!");
|
||||||
setMessage("");
|
setMessage("");
|
||||||
setPhoneNumber("");
|
setPhoneNumber("");
|
||||||
|
|
Loading…
Reference in a new issue