diff --git a/lib/registration.rb b/lib/registration.rb index e5db85ec22ec04a7e8e0029fa26ac6ec61e962cb..849d28e60461e07c7b9a32bc197e02059697a38f 100644 --- a/lib/registration.rb +++ b/lib/registration.rb @@ -5,10 +5,11 @@ require "ruby-bandwidth-iris" require "securerandom" require_relative "./alt_top_up_form" -require_relative "./command" require_relative "./bandwidth_tn_order" +require_relative "./command" require_relative "./em" require_relative "./oob" +require_relative "./proxied_jid" require_relative "./tel_selections" class Registration diff --git a/sgx_jmp.rb b/sgx_jmp.rb index 53d2227213f383fc8f8dbc76832abf2e7e1cd233..2841f5961cc0485e196821301160de52cf857480 100644 --- a/sgx_jmp.rb +++ b/sgx_jmp.rb @@ -431,7 +431,7 @@ Command.new( list_for: ->(*) { true }, customer_repo: CustomerRepo.new(sgx_repo: Bwmsgsv2Repo.new) ) { - Command.customer.catch { + Command.customer.catch_only(CustomerRepo::NotFound) { Sentry.add_breadcrumb(Sentry::Breadcrumb.new(message: "Customer.create")) Command.execution.customer_repo.create(Command.execution.iq.from.stripped) }.then { |customer| diff --git a/web.rb b/web.rb index cca140e7901fae16d632c5b992780b1e69b66aec..1286a36bf663a92cb4ca2a918c4431bb94434fbf 100644 --- a/web.rb +++ b/web.rb @@ -82,7 +82,7 @@ class Web < Roda def log_error(e) log.error( - "Error raised during #{request.full_path}: #{e.class}", + "Error raised during #{request.fullpath}: #{e.class}", e, loggable_params ) @@ -269,13 +269,13 @@ class Web < Roda end r.post do + Sentry.set_user(tel: params["to"]) customer_repo( sgx_repo: Bwmsgsv2Repo.new ).find_by_tel(params["to"]).then { |customer| Sentry.set_user(id: customer.customer_id) EMPromise.all([ - customer.customer_id, - customer.fwd, + customer.customer_id, customer.fwd, call_attempt_repo.find_inbound( customer, params["from"], call_id: params["callId"] )