Method: SparkApi::ClientError#initialize
- Defined in:
- lib/spark_api/errors.rb
#initialize(options = {}) ⇒ ClientError
Returns a new instance of ClientError.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/spark_api/errors.rb', line 25 def initialize ( = {}) # Support the standard initializer for errors opts = .is_a?(Hash) ? : {:message => .to_s} @code = opts[:code] @status = opts[:status] @details = opts[:details] @request_path = opts[:request_path] @errors = opts[:errors] super(opts[:message]) end |