Module: Startback::Errors
Defined Under Namespace
Classes: BadRequestError, ConflictError, Error, ExpectationFailedError, ForbiddenError, GoneError, InternalServerError, LockedError, MethodNotAllowedError, NotAcceptableError, NotFoundError, NotImplementedError, PreconditionFailedError, PreconditionRequiredError, TooManyRequestsError, UnauthorizedError, UnsupportedMediaTypeError
Class Method Summary
collapse
Class Method Details
.bad_request_error!(msg = nil) ⇒ Object
112
113
114
|
# File 'lib/startback/errors.rb', line 112
def bad_request_error!(msg = nil)
raise Startback::Errors::BadRequestError, msg
end
|
.conflict_error!(msg = nil) ⇒ Object
142
143
144
|
# File 'lib/startback/errors.rb', line 142
def conflict_error!(msg = nil)
raise Startback::Errors::ConflictError, msg
end
|
.expectation_failed_error!(msg = nil) ⇒ Object
162
163
164
|
# File 'lib/startback/errors.rb', line 162
def expectation_failed_error!(msg = nil)
raise Startback::Errors::ExpectationFailedError, msg
end
|
.forbidden_error!(msg = nil) ⇒ Object
122
123
124
|
# File 'lib/startback/errors.rb', line 122
def forbidden_error!(msg = nil)
raise Startback::Errors::ForbiddenError, msg
end
|
.gone_error!(msg = nil) ⇒ Object
147
148
149
|
# File 'lib/startback/errors.rb', line 147
def gone_error!(msg = nil)
raise Startback::Errors::GoneError, msg
end
|
.internal_server_error!(msg = nil) ⇒ Object
177
178
179
|
# File 'lib/startback/errors.rb', line 177
def internal_server_error!(msg = nil)
raise Startback::Errors::InternalServerError, msg
end
|
.locked_error!(msg = nil) ⇒ Object
167
168
169
|
# File 'lib/startback/errors.rb', line 167
def locked_error!(msg = nil)
raise Startback::Errors::LockedError, msg
end
|
.method_not_allowed_error!(msg = nil) ⇒ Object
132
133
134
|
# File 'lib/startback/errors.rb', line 132
def method_not_allowed_error!(msg = nil)
raise Startback::Errors::MethodNotAllowedError, msg
end
|
.not_acceptable_error!(msg = nil) ⇒ Object
137
138
139
|
# File 'lib/startback/errors.rb', line 137
def not_acceptable_error!(msg = nil)
raise Startback::Errors::NotAcceptableError, msg
end
|
.not_found_error!(msg = nil) ⇒ Object
127
128
129
|
# File 'lib/startback/errors.rb', line 127
def not_found_error!(msg = nil)
raise Startback::Errors::NotFoundError, "#{msg} not found"
end
|
.not_implemented_error!(msg = nil) ⇒ Object
182
183
184
|
# File 'lib/startback/errors.rb', line 182
def not_implemented_error!(msg = nil)
raise Startback::Errors::NotImplementedError, msg
end
|
.precondition_failed_error!(msg = nil) ⇒ Object
152
153
154
|
# File 'lib/startback/errors.rb', line 152
def precondition_failed_error!(msg = nil)
raise Startback::Errors::PreconditionFailedError, msg
end
|
.precondition_required_error!(msg = nil) ⇒ Object
172
173
174
|
# File 'lib/startback/errors.rb', line 172
def precondition_required_error!(msg = nil)
raise Startback::Errors::PreconditionRequiredError, msg
end
|
.server_error!(msg = nil) ⇒ Object
194
195
196
|
# File 'lib/startback/errors.rb', line 194
def server_error!(msg = nil)
raise Startback::Errors::InternalServerError, msg
end
|
.unauthorized_error!(msg = nil) ⇒ Object
117
118
119
|
# File 'lib/startback/errors.rb', line 117
def unauthorized_error!(msg = nil)
raise Startback::Errors::UnauthorizedError, msg
end
|
157
158
159
|
# File 'lib/startback/errors.rb', line 157
def unsupported_media_type_error!(media)
raise Startback::Errors::UnsupportedMediaTypeError, "Unable to use `#{media}` as input data"
end
|
.user_error!(msg = nil) ⇒ Object
189
190
191
|
# File 'lib/startback/errors.rb', line 189
def user_error!(msg = nil)
raise Startback::Errors::BadRequestError, msg
end
|