Exception: DeepL::Exceptions::RequestError

Inherits:
Error
  • Object
show all
Defined in:
lib/deepl/exceptions/request_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Error

#should_retry?

Constructor Details

#initialize(response) ⇒ RequestError

Returns a new instance of RequestError.



11
12
13
14
# File 'lib/deepl/exceptions/request_error.rb', line 11

def initialize(response)
  super()
  @response = response
end

Instance Attribute Details

#requestObject (readonly)

Returns the value of attribute request.



9
10
11
# File 'lib/deepl/exceptions/request_error.rb', line 9

def request
  @request
end

#responseObject (readonly)

Returns the value of attribute response.



9
10
11
# File 'lib/deepl/exceptions/request_error.rb', line 9

def response
  @response
end

Instance Method Details

#messageObject



16
17
18
# File 'lib/deepl/exceptions/request_error.rb', line 16

def message
  'Unknown error.'
end