Exception: DeepL::Exceptions::NotFound

Inherits:
RequestError show all
Defined in:
lib/deepl/exceptions/not_found.rb

Instance Attribute Summary

Attributes inherited from RequestError

#request, #response

Instance Method Summary collapse

Methods inherited from RequestError

#initialize

Methods inherited from Error

#should_retry?

Constructor Details

This class inherits a constructor from DeepL::Exceptions::RequestError

Instance Method Details

#messageObject



9
10
11
12
13
# File 'lib/deepl/exceptions/not_found.rb', line 9

def message
  JSON.parse(response.body)['message']
rescue JSON::ParserError
  response.body
end