function formatterError(res, err, msg) {
    // If the user provided a non-success error code, we don't want to
    // mess with it since their error is probably more important than
    // our inability to format their message.
    if (res.statusCode >= 200 && res.statusCode < 300) {
        res.statusCode = err.statusCode;
    }

    if (typeof msg !== 'string') {
        msg = 'error retrieving formatter';
    }

    res.log.warn(
        {
            req: res.req,
            err: err
        },
        msg
    );

    return flush(res);
}
formatterError is used to handle any case where we were unable to
properly format the provided body

@private
@function formatterError
@param {Response} res - response
@param {Error} err - error
@param {String} [msg] - custom log message
@returns {Response} response