salix/front/core/lib/http-error.js

13 lines
443 B
JavaScript
Raw Permalink Normal View History

/**
* 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';
}
}