class Shaf::Errors::NotFoundError
Attributes
clazz[R]
id[R]
Public Class Methods
new(msg = nil, clazz: nil, id: nil)
click to toggle source
Calls superclass method
Shaf::Errors::ServerError::new
# File lib/shaf/errors.rb, line 59 def initialize(msg = nil, clazz: nil, id: nil) @clazz = clazz @id = id msg ||= "#{clazz ? "#{clazz.to_s} r" : "R"}esource with id #{id} does not exist" super(msg, code: "RESOURCE_NOT_FOUND", title: "Resource not found") end
Public Instance Methods
http_status()
click to toggle source
# File lib/shaf/errors.rb, line 55 def http_status 404 end