nitcorn :: HttpResponse :: api_error
status
Like the rest of the API, errors are formated as JSON:
{ "status": 404, "message": "Not found" }
# Return an HTTP error response with `status` # # Like the rest of the API, errors are formated as JSON: # ~~~json # { "status": 404, "message": "Not found" } # ~~~ fun api_error(status: Int, message: String) do json(new APIError(status, message), status) end