class Cuprum::Rails::Responders::Json::Resource
Defines default responses for a RESTful resource.
-
create success: serializes the data with status 201 Created.
-
failure AlreadyExists: serializes the error with status 422 Unprocessable
Entity.
-
failure ExtraAttributes: serializes the error with status 422
Unprocessable Entity.
-
failure FailedValidation: serializes the error with status 422
Unprocessable Entity.
-
failure MissingParameters: serializes the error with status 400 Bad
Request.
-
failure NotFound: serializes the error with status 404 Not Found.
Responds to any other successful result by serializing the result value with status 200. For a failing result, serializes a generic error with status 500 Internal Server Error.