From 56726ff7a903c42b46fd4624ed3b002324d56551 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Mon, 29 Jan 2024 14:42:45 -0500 Subject: [PATCH] Ignore more kinds of exceptions --- web.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web.rb b/web.rb index 3246daface66f41b93c6d2c624e07ba506985983..f70fde322f7195375bf4e8b59085125ecf05bc87 100644 --- a/web.rb +++ b/web.rb @@ -181,10 +181,10 @@ class Web < Roda call_id, body: body ) - rescue Bandwidth::ApiErrorResponseException + rescue Bandwidth::APIException # If call does not exist, don't need to hang up or send to voicemail # Other side must have hung up already - raise $! unless $!.response_code.to_s == "404" + raise $! unless [404, 409].include?($!.response_code) end def start_transcription(customer, call_id, media_url)