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)