Exception: Shaf::Errors::BadRequestError

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) ⇒ BadRequestError

Returns a new instance of BadRequestError.



24
25
26
27
# File 'lib/shaf/errors.rb', line 24

def initialize(msg = nil)
  msg ||= "The request could not be understood"
  super(msg, code: "INVALID_REQUEST", title: "Invalid request")
end

Instance Method Details

#http_statusObject



20
21
22
# File 'lib/shaf/errors.rb', line 20

def http_status
  400
end