chore: rescue errors only in delete_twiml_app
This commit is contained in:
@@ -4,8 +4,6 @@ class Twilio::VoiceTeardownService
|
||||
def perform
|
||||
delete_twiml_app if channel.twiml_app_sid.present?
|
||||
clear_number_webhooks
|
||||
rescue StandardError => e
|
||||
Rails.logger.error("TWILIO_VOICE_TEARDOWN_ERROR: #{e.class} #{e.message} phone=#{channel.phone_number} account=#{channel.account_id}")
|
||||
ensure
|
||||
clear_voice_credentials
|
||||
end
|
||||
@@ -14,6 +12,8 @@ class Twilio::VoiceTeardownService
|
||||
|
||||
def delete_twiml_app
|
||||
twilio_client.applications(channel.twiml_app_sid).delete
|
||||
rescue StandardError => e
|
||||
Rails.logger.error("TWILIO_VOICE_TEARDOWN_ERROR: #{e.class} #{e.message} phone=#{channel.phone_number} account=#{channel.account_id}")
|
||||
end
|
||||
|
||||
def clear_number_webhooks
|
||||
|
||||
Reference in New Issue
Block a user