Exception: Shaf::Errors::NotAcceptableError

Inherits:
ServerError show all
Defined in:
lib/shaf/errors.rb

Instance Attribute Summary

Attributes inherited from ServerError

#code, #title

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil) ⇒ NotAcceptableError

Returns a new instance of NotAcceptableError.



72
73
74
75
# File 'lib/shaf/errors.rb', line 72

def initialize(msg = nil)
  msg ||= 'Resource found, but a suitable representation could not be generated'
  super(msg, code: 'NOT_ACCEPTABLE', title: 'Content negotiation failed')
end

Instance Method Details

#http_statusObject



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

def http_status
  406
end