Exception: Legate::ToolHttpError

Inherits:
ToolError show all
Defined in:
lib/legate/errors.rb

Overview

Raised when an HTTP request receives an unsuccessful status code (4xx or 5xx).

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ToolError

#cause

Constructor Details

#initialize(message = nil, response: nil, cause: nil) ⇒ ToolHttpError

Returns a new instance of ToolHttpError.

Parameters:

  • message (String) (defaults to: nil)

    The error message.

  • response (Object, nil) (defaults to: nil)

    The HTTP response object.

  • cause (Exception, nil) (defaults to: nil)

    The original exception.



67
68
69
70
# File 'lib/legate/errors.rb', line 67

def initialize(message = nil, response: nil, cause: nil)
  super(message, cause: cause)
  @response = response
end

Instance Attribute Details

#responseObject? (readonly)

Returns The HTTP response object (provides status, headers, body).

Returns:

  • (Object, nil)

    The HTTP response object (provides status, headers, body).



62
63
64
# File 'lib/legate/errors.rb', line 62

def response
  @response
end