restError.js 920 B

12345678910111213141516171819202122
  1. // Copyright (c) Microsoft Corporation. All rights reserved.
  2. // Licensed under the MIT License. See License.txt in the project root for license information.
  3. import * as tslib_1 from "tslib";
  4. var RestError = /** @class */ (function (_super) {
  5. tslib_1.__extends(RestError, _super);
  6. function RestError(message, code, statusCode, request, response, body) {
  7. var _this = _super.call(this, message) || this;
  8. _this.code = code;
  9. _this.statusCode = statusCode;
  10. _this.request = request;
  11. _this.response = response;
  12. _this.body = body;
  13. Object.setPrototypeOf(_this, RestError.prototype);
  14. return _this;
  15. }
  16. RestError.REQUEST_SEND_ERROR = "REQUEST_SEND_ERROR";
  17. RestError.REQUEST_ABORTED_ERROR = "REQUEST_ABORTED_ERROR";
  18. RestError.PARSE_ERROR = "PARSE_ERROR";
  19. return RestError;
  20. }(Error));
  21. export { RestError };
  22. //# sourceMappingURL=restError.js.map