Exception: Fanforce::Error::NotFound
Overview
Method or record could not be found
Instance Attribute Summary
#env, #public_errors
Instance Method Summary
collapse
#curl_command, #for, #format_error, #format_errors
Constructor Details
#initialize(*args) ⇒ NotFound
Returns a new instance of NotFound.
73
74
75
76
77
78
79
80
81
82
|
# File 'lib/fanforce/errors/errors.rb', line 73
def initialize(*args)
if args[0].is_a?(Hash)
super(*args)
else
super(
resource: args[0].to_s.demodulize.singularize,
message: args[1]
)
end
end
|
Instance Method Details
#code ⇒ Object
69
|
# File 'lib/fanforce/errors/errors.rb', line 69
def code; 404 end
|
#default_error_code ⇒ Object
72
|
# File 'lib/fanforce/errors/errors.rb', line 72
def default_error_code; :unknown end
|
#default_message ⇒ Object
70
|
# File 'lib/fanforce/errors/errors.rb', line 70
def default_message; 'Not Found' end
|
#valid_error_codes ⇒ Object
71
|
# File 'lib/fanforce/errors/errors.rb', line 71
def valid_error_codes; [:record_not_found, :method_not_found] end
|