Add an Error subclass for wrapping Backbone errors.

Review Request #2153 — Created May 25, 2021 and updated

guest220
Review Board
12
200
e5182d5...
dfa, guset
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.

Testing Done:
Used this in conjunction with other changes.

Reviewed at https://reviews.reviewboard.org/r/11420/


guest220
guest220
Review request changed

Status: Re-opened

guest3648
  1. DSDF sdf * Bad * Code

  2. 
      
Loading...