Exception: Shaf::Errors::ForbiddenError

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

Returns a new instance of ForbiddenError.



46
47
48
49
# File 'lib/shaf/errors.rb', line 46

def initialize(msg = nil)
  msg ||= "User is not allowed to perform this action"
  super(msg, code: "FORBIDDEN", title: "User not allowed")
end

Instance Method Details

#http_statusObject



42
43
44
# File 'lib/shaf/errors.rb', line 42

def http_status
  403
end