From 46b3f4f4c0dac319e1a9d5ed29465ccb6c8760dc Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Mon, 11 Oct 2021 09:16:31 -0500 Subject: [PATCH] Customer not found, return auth error instead of panic --- sgx_jmp.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sgx_jmp.rb b/sgx_jmp.rb index fc3407c..80dce0e 100644 --- a/sgx_jmp.rb +++ b/sgx_jmp.rb @@ -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 -- 2.34.5