• 
      

    Fix error reporting for API requests in the commits view and elsewhere.

    Review Request #5323 — Created Jan. 26, 2014 and submitted

    Information

    Review Board
    master

    Reviewers

    Fix error reporting for API requests in the commits view and elsewhere.

    The commits view wasn't showing any error responses when failing to
    create a review request. It now displays an alert and clears the
    spinner.

    While working to fix this, I realized our error handling wasn't correct.
    We weren't taking in the correct parameters in syncOptions.error that
    RB.apiCall passes, and we weren't passing the arguments that Backbone's
    wrapError expects. This now wires everything up so that errors coming
    from the server will be properly represented in error handlers.

    Triggered an error with a commit in the New Review Request page. Instead
    of spinning forever, I saw an alert with the error message, and the spinner
    stopped. I was then able to post a new commit.

    Unit tests pass (except one failure unrelated to this change).