Customer not found, return auth error instead of panic
1 files changed, 2 insertions(+), 0 deletions(-) M sgx_jmp.rb
M sgx_jmp.rb => sgx_jmp.rb +2 -0
@@ 269,6 269,8 @@ message( m.to = m.to.with(domain: customer.jid.domain) address["jid"] = customer.jid.to_s BLATHER << m + }.catch_only(CustomerRepo::NotFound) { |e| + BLATHER << iq.as_error("forbidden", :auth, e.message) }.catch { |e| panic(e, sentry_hub) } end