Error from SGX should not result in an unregistered customer
Stephen Paul Weber
created
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.
@@ -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