/** * Wraps $http error responses. This class is mainly used to * avoid the default AngularJS behaviour, that is, stringifying all * unhandled rejections that aren't @Error objects. More info at: * - https://github.com/angular/angular.js/issues/14631 */ export default class HttpError extends Error { constructor(message, fileName, lineNumber) { super(message, fileName, lineNumber); this.name = 'HttpError'; } }