Vishnu Narayanan
2022-03-28 18:14:30 +05:30
committed by GitHub
parent 823c0ab6a7
commit 8155024b6a
19 changed files with 25 additions and 25 deletions

View File

@@ -5,14 +5,14 @@ class Twilio::WebhookSetupService
def perform
if phone_numbers.empty?
Rails.logger.info "TWILIO_PHONE_NUMBER_NOT_FOUND: #{channel.phone_number}"
Rails.logger.warn "TWILIO_PHONE_NUMBER_NOT_FOUND: #{channel.phone_number}"
else
twilio_client
.incoming_phone_numbers(phonenumber_sid)
.update(sms_method: 'POST', sms_url: twilio_callback_index_url)
end
rescue Twilio::REST::TwilioError => e
Rails.logger.info "TWILIO_FAILURE: #{e.message}"
Rails.logger.error "TWILIO_FAILURE: #{e.message}"
end
private