class Shaf::Errors::ServerError

Attributes

code[R]
title[R]

Public Class Methods

new(msg = "Unknown error", code: nil, title: nil) click to toggle source
Calls superclass method
# File lib/shaf/errors.rb, line 12
def initialize(msg = "Unknown error", code: nil, title: nil)
  super(msg)
  @code = code || "UNKNOWN_ERROR"
  @title = title || "Something bad happend"
end

Public Instance Methods

http_status() click to toggle source
# File lib/shaf/errors.rb, line 8
def http_status
  500
end