Exception: TeslaAPI::Errors::InvalidJSON

Inherits:
StandardError
  • Object
show all
Defined in:
lib/tesla-api/errors.rb

Overview

JSON cannot be parsed

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error) ⇒ InvalidJSON

Returns a new instance of InvalidJSON.



9
10
11
# File 'lib/tesla-api/errors.rb', line 9

def initialize(error)
  @error = error
end

Instance Attribute Details

#errorObject (readonly)

JSON parsing error details



7
8
9
# File 'lib/tesla-api/errors.rb', line 7

def error
  @error
end

Instance Method Details

#to_sObject



13
14
15
# File 'lib/tesla-api/errors.rb', line 13

def to_s
  error.to_s
end