Forcing an error in an AJAX call

When calling AJAX from Javascript, callbacks of ‘success’ and ‘error’ are typically supported.  Your call might look something like this (I happen to be using Angular here): $http( request ).success( function( response ) { console.log( ‘SUCCESS: ‘ + response ); }).error( function( response ) { console.log( ‘ERROR: ‘ + response ); });   Your server code,…