• 
      

    Add an Error subclass for wrapping Backbone errors.

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

    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.

    Description From Last Updated

    Col: 7 'BackboneError' is defined but never used.

    reviewbotreviewbot

    Should be modelOrCollection, here and in the argument, since that's the variable name format we use in JavaScript.

    chipx86chipx86

    Col: 7 'BackboneError' is defined but never used.

    reviewbotreviewbot
    Checks run (1 failed, 1 succeeded)
    flake8 passed.
    JSHint failed.

    JSHint

    chipx86
    1. 
        
    2. Show all issues

      Should be modelOrCollection, here and in the argument, since that's the variable name format we use in JavaScript.

    3. 
        
    david
    Review request changed
    Commit:
    e8807963cd75cbb7e286d5bc20c8485f02c899cd
    72ac72224e542f6ab9afdfed4a83fb611f67d5c0

    Checks run (1 failed, 1 succeeded)

    flake8 passed.
    JSHint failed.

    JSHint

    chipx86
    1. Ship It!
    2. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to master (e5182d5)