Exception: TableauApi::TableauError
- Inherits:
-
StandardError
- Object
- StandardError
- TableauApi::TableauError
- Defined in:
- lib/tableau_api/error.rb
Instance Attribute Summary collapse
-
#detail ⇒ Object
readonly
Returns the value of attribute detail.
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#http_response_code ⇒ Object
readonly
Returns the value of attribute http_response_code.
-
#summary ⇒ Object
readonly
Returns the value of attribute summary.
Instance Method Summary collapse
-
#initialize(net_response) ⇒ TableauError
constructor
A new instance of TableauError.
Constructor Details
#initialize(net_response) ⇒ TableauError
Returns a new instance of TableauError.
5 6 7 8 9 10 11 12 |
# File 'lib/tableau_api/error.rb', line 5 def initialize(net_response) @http_response_code = net_response.code error = HTTParty::Parser.new(net_response.body, :xml).parse['tsResponse']['error'] @error_code = error['code'] @summary = error['summary'] @detail = error['detail'] super(summary) end |
Instance Attribute Details
#detail ⇒ Object (readonly)
Returns the value of attribute detail.
3 4 5 |
# File 'lib/tableau_api/error.rb', line 3 def detail @detail end |
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
3 4 5 |
# File 'lib/tableau_api/error.rb', line 3 def error_code @error_code end |
#http_response_code ⇒ Object (readonly)
Returns the value of attribute http_response_code.
3 4 5 |
# File 'lib/tableau_api/error.rb', line 3 def http_response_code @http_response_code end |
#summary ⇒ Object (readonly)
Returns the value of attribute summary.
3 4 5 |
# File 'lib/tableau_api/error.rb', line 3 def summary @summary end |