sendError = function (err, req, res) {
        var i, output,
            errObj = {error: err.message};

        output = objToStr(errObj, req.param('format', req.param('f', 'json')));
        sendResults(output, res);
    }
Send formatted error.
@param {Object} err The error object.
@param {Object} req The request that generated error.
@param {Object} res The response to send formatted error to.