Exception: Hyperdrive::Errors::NotAcceptable

Inherits:
HTTPError
  • Object
show all
Defined in:
lib/hyperdrive/errors/not_acceptable.rb

Instance Method Summary collapse

Constructor Details

#initialize(http_accept) ⇒ NotAcceptable

Returns a new instance of NotAcceptable.



4
5
6
# File 'lib/hyperdrive/errors/not_acceptable.rb', line 4

def initialize(http_accept)
  @http_accept = http_accept
end

Instance Method Details

#http_status_codeObject



12
13
14
# File 'lib/hyperdrive/errors/not_acceptable.rb', line 12

def http_status_code
  406
end

#messageObject



8
9
10
# File 'lib/hyperdrive/errors/not_acceptable.rb', line 8

def message
  "This resource is not capable of generating content in the format requested by the Accept headers (#{@http_accept})."
end