The following responses are bundled with all new Sails apps inside the /api/responses
folder. Each one sends a normalized JSON object if the client is expecting JSON, containing a status
key with the HTTP status code, and additional keys with relevant information about any errors.
This method is used to send a 200 ("Ok") response back down to the client indicating that everything worked out a-okay. See the res.ok()
reference page for usage info.
This method is used to send a 500 ("Server Error") response back down to the client indicating that some kind of server error occurred. See the res.serverError()
reference page for usage info.
This method is used to send a 400 ("Bad Request") response back down to the client indicating that the request is invalid. See the res.badRequest()
reference page for usage info.
This method is used to send a 404 ("Not Found") response back down to the client indicating that the requested URL doesn’t match any routes in the app. See the res.notFound()
reference page for usage info.
This method is used to send a 403 ("Forbidden") response back down to the client indicating that the request is not allowed. See the res.forbidden()
reference page for usage info.
This method is used to send a 201 ("Created") response back down to the client indicating that one or more new resources have been created. See the res.created()
reference page for usage info.