no, I mean I don't like that `_renderError` needs a copy of `opts`.


On Mon, Mar 11, 2013 at 10:47 AM, Jen Fong-Adwent
<notifications@github.com>wrote:

> In hearth/media/js/requests.js:
>
> > +            _renderError(opts, jqXHR, textStatus, error);
> > +        });
> > +    }
> > +
> > +    function post(opts) {
> > +        $.ajax({
> > +            url: opts.url,
> > +            data: opts.data,
> > +            type: 'POST',
> > +            dataType: 'json',
> > +            cache: false
> > +        }).done(function (data) {
> > +            opts.success(data);
> > +
> > +        }).fail(function (jqXHR, textStatus, error) {
> > +            _renderError(opts, jqXHR, textStatus, error);
>
> you don't need to pass options in to get an error handler. you only do if
> it is different from the default error e.g.
> https://github.com/mozilla/fireplace/pull/53/files#L1R7
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/mozilla/fireplace/pull/53/files#r3321667>
> .
>