Exception: Orcid::RemoteServiceError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Orcid::RemoteServiceError
- Defined in:
- lib/orcid/exceptions.rb
Overview
Because in trouble shooting what all goes into this remote call, you may very well want all of this.
Instance Method Summary collapse
-
#initialize(options) ⇒ RemoteServiceError
constructor
A new instance of RemoteServiceError.
Constructor Details
#initialize(options) ⇒ RemoteServiceError
Returns a new instance of RemoteServiceError.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/orcid/exceptions.rb', line 5 def initialize() text = [] text << "-- Client --" if client = [:client] text << "id:\n\t#{client.id.inspect}" text << "site:\n\t#{client.site.inspect}" text << "options:\n\t#{client.options.inspect}" end text << "\n-- Token --" if token = [:token] text << "access_token:\n\t#{token.token.inspect}" text << "refresh_token:\n\t#{token.refresh_token.inspect}" end text << "\n-- Request --" text << "path:\n\t#{options[:request_path].inspect}" if [:request_path] text << "headers:\n\t#{options[:request_headers].inspect}" if [:request_headers] text << "body:\n\t#{options[:request_body]}" if [:request_body] text << "\n-- Response --" text << "status:\n\t#{options[:response_status].inspect}" if [:response_status] text << "body:\n\t#{options[:response_body]}" if [:response_body] super(text.join("\n")) end |