@@ -366,7 +366,7 @@ class Web < Roda
from = params["from"].sub(/^\+1/, "")
customer_repo(
sgx_repo: Bwmsgsv2Repo.new
- ).find_by_format(from).then do |c|
+ ).find_by_format(from).then { |c|
call_attempt_repo.find_outbound(
c,
params["to"],
@@ -378,7 +378,9 @@ class Web < Roda
call_attempt_repo.starting_call(c, params["callId"])
render(*ca.to_render)
end
- end
+ }.catch_only(CustomerRepo::NotFound) {
+ render "outbound/no_customer"
+ }
end
end
end