3
我是Ruby/Ruby on Rails的新手。我寫了下面的代碼從api獲取布爾值。 API調用失敗,並且它去救援塊。但由於某種原因,它將該值設置爲true。我不明白這是怎麼發生的。Ruby變量值設置爲true
@is_attached = OnDeck.api.check_is_attached(@decision.application_number, current_user)
API調用/客戶包裝代碼
def check_is_attached(app_number, user)
begin
client.check_is_attached(app_number, user.auth_token)
rescue OnDeckException::MerchantApiException => e
Rails.logger.error("Caught exception #{e} while calling check_mbs_attached for app_number : #{app_number}")
end
end
正確的,你仍然可以返回不管你從急救塊的願望。 – whodini9
哦,謝謝!應該想到這一點。 – NewQueries