From 492360c453d774fbd99fc74d079643d347fa9ca4 Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Mon, 14 Feb 2022 20:42:08 -0500 Subject: [PATCH] Error from SGX should not result in an unregistered customer If the SGX fetch fails, this is a problem. Even in the original case this was written for (registration) we have seen strange issues that can come up when the code assumes that an SGX error means they are unregistered. They may or may not be unregistered, and we simply don't know. So we should let the error bubble through and be handled (if possible) upstream. --- lib/ibr_repo.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ibr_repo.rb b/lib/ibr_repo.rb index f00d3c8a46df82e21d01095d35b1aaf2e0158234..22faa6c316bfa026d1dbc2c0d32b5fce69cf734e 100644 --- a/lib/ibr_repo.rb +++ b/lib/ibr_repo.rb @@ -14,7 +14,7 @@ class IBRRepo ibr = IBR.new(:get, jid) ibr.from = from - iq_manager.write(ibr).catch { nil }.then do |result| + iq_manager.write(ibr).then do |result| if result.respond_to?(:registered?) && result.registered? result else