Add an Error subclass for wrapping Backbone errors.

Review Request #11420 — Created Jan. 29, 2021 and submitted — Latest diff uploaded

Information

Review Board
master
72ac722...

Reviewers

As part of some future-looking work on our JavaScript codebase, we need
a way to wrap errors from Backbone in a single object. Most backbone
error callbacks take three arguments: the object that encountered the
error (either a Model or Collection instance), the request (a
jQuery.XHR), and the options object that was passed into the call that
generated the error. This new error subclass wraps all of that up
together, setting the default message on the error to be the errorText
from the XHR object.

Used this in conjunction with other changes.

    Loading...