diff --git a/lib/tel_selections.rb b/lib/tel_selections.rb index 3c9592cbc850a1e181dd56472037ad3ae4436535..85a0a798503c31362214d65a20a508c88277a8ac 100644 --- a/lib/tel_selections.rb +++ b/lib/tel_selections.rb @@ -41,7 +41,11 @@ class TelSelections Command.reply { |reply| reply.allowed_actions = [:next] reply.command << FormTemplate.render("tn_search", error: error) - }.then { |iq| choose_from_list(AvailableNumber.for(iq.form).tns) } + }.then do |iq| + choose_from_list(AvailableNumber.for(iq.form).tns) + rescue StandardError + choose_tel(error: $!.to_s) + end end def choose_from_list(tns)