Exception: Viddlereo::Error

Inherits:
Exception
  • Object
show all
Includes:
HappyMapper
Defined in:
lib/viddlereo/error.rb

Class Method Summary collapse

Class Method Details

.from_rest_client_exception(rest_client_exception) ⇒ Object



9
10
11
12
# File 'lib/viddlereo/error.rb', line 9

def self.from_rest_client_exception(rest_client_exception)
  parsed_response = parse(rest_client_exception.response)
  new("Viddlereo Error #{parsed_response.code}: #{parsed_response.description}")
end