class NexaasID::Client::ExceptionWrapper
Delegator class which intercepts exceptions raised by OAuth::AccessToken methods and wraps them in [NexaasID::Client::Exception] exceptions.
- API
-
Documentation:
Public Instance Methods
refresh(*args)
click to toggle source
Calls superclass method
# File lib/nexaas_id/client/exception_wrapper.rb, line 8 def refresh(*args) call_with_rescue { super } end
request(*args, &block)
click to toggle source
Calls superclass method
# File lib/nexaas_id/client/exception_wrapper.rb, line 12 def request(*args, &block) call_with_rescue { super } end
Private Instance Methods
call_with_rescue() { || ... }
click to toggle source
# File lib/nexaas_id/client/exception_wrapper.rb, line 18 def call_with_rescue yield rescue Faraday::ClientError, OAuth2::Error => exception raise NexaasID::Client::Exception.new(exception.message, exception.response) end