@azure/core-rest-pipeline
Advanced tools
Comparing version
@@ -27,3 +27,2 @@ import type { PipelineRequest, PipelineResponse } from "./interfaces.js"; | ||
export declare class RestError extends Error { | ||
[x: symbol]: () => string; | ||
/** | ||
@@ -30,0 +29,0 @@ * Something went wrong when making the request. |
@@ -22,12 +22,13 @@ // Copyright (c) Microsoft Corporation. | ||
Object.defineProperty(this, "response", { value: options.response, enumerable: false }); | ||
// Logging method for util.inspect in Node | ||
Object.defineProperty(this, custom, { | ||
value: () => { | ||
// Extract non-enumerable properties and add them back. This is OK since in this output the request and | ||
// response get sanitized. | ||
return `RestError: ${this.message} \n ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { request: this.request, response: this.response }))}`; | ||
}, | ||
enumerable: false, | ||
}); | ||
Object.setPrototypeOf(this, RestError.prototype); | ||
} | ||
/** | ||
* Logging method for util.inspect in Node | ||
*/ | ||
[custom]() { | ||
// Extract non-enumerable properties and add them back. This is OK since in this output the request and | ||
// response get sanitized. | ||
return `RestError: ${this.message} \n ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { request: this.request, response: this.response }))}`; | ||
} | ||
} | ||
@@ -34,0 +35,0 @@ /** |
@@ -27,3 +27,2 @@ import type { PipelineRequest, PipelineResponse } from "./interfaces.js"; | ||
export declare class RestError extends Error { | ||
[x: symbol]: () => string; | ||
/** | ||
@@ -30,0 +29,0 @@ * Something went wrong when making the request. |
@@ -26,12 +26,13 @@ "use strict"; | ||
Object.defineProperty(this, "response", { value: options.response, enumerable: false }); | ||
// Logging method for util.inspect in Node | ||
Object.defineProperty(this, inspect_js_1.custom, { | ||
value: () => { | ||
// Extract non-enumerable properties and add them back. This is OK since in this output the request and | ||
// response get sanitized. | ||
return `RestError: ${this.message} \n ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { request: this.request, response: this.response }))}`; | ||
}, | ||
enumerable: false, | ||
}); | ||
Object.setPrototypeOf(this, RestError.prototype); | ||
} | ||
/** | ||
* Logging method for util.inspect in Node | ||
*/ | ||
[inspect_js_1.custom]() { | ||
// Extract non-enumerable properties and add them back. This is OK since in this output the request and | ||
// response get sanitized. | ||
return `RestError: ${this.message} \n ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { request: this.request, response: this.response }))}`; | ||
} | ||
} | ||
@@ -38,0 +39,0 @@ exports.RestError = RestError; |
@@ -8,5 +8,5 @@ // This file is read by tools that parse documentation comments conforming to the TSDoc standard. | ||
"packageName": "@microsoft/api-extractor", | ||
"packageVersion": "7.51.1" | ||
"packageVersion": "7.52.1" | ||
} | ||
] | ||
} |
@@ -27,3 +27,2 @@ import type { PipelineRequest, PipelineResponse } from "./interfaces.js"; | ||
export declare class RestError extends Error { | ||
[x: symbol]: () => string; | ||
/** | ||
@@ -30,0 +29,0 @@ * Something went wrong when making the request. |
@@ -22,12 +22,13 @@ // Copyright (c) Microsoft Corporation. | ||
Object.defineProperty(this, "response", { value: options.response, enumerable: false }); | ||
// Logging method for util.inspect in Node | ||
Object.defineProperty(this, custom, { | ||
value: () => { | ||
// Extract non-enumerable properties and add them back. This is OK since in this output the request and | ||
// response get sanitized. | ||
return `RestError: ${this.message} \n ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { request: this.request, response: this.response }))}`; | ||
}, | ||
enumerable: false, | ||
}); | ||
Object.setPrototypeOf(this, RestError.prototype); | ||
} | ||
/** | ||
* Logging method for util.inspect in Node | ||
*/ | ||
[custom]() { | ||
// Extract non-enumerable properties and add them back. This is OK since in this output the request and | ||
// response get sanitized. | ||
return `RestError: ${this.message} \n ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { request: this.request, response: this.response }))}`; | ||
} | ||
} | ||
@@ -34,0 +35,0 @@ /** |
@@ -27,3 +27,2 @@ import type { PipelineRequest, PipelineResponse } from "./interfaces.js"; | ||
export declare class RestError extends Error { | ||
[x: symbol]: () => string; | ||
/** | ||
@@ -30,0 +29,0 @@ * Something went wrong when making the request. |
@@ -22,12 +22,13 @@ // Copyright (c) Microsoft Corporation. | ||
Object.defineProperty(this, "response", { value: options.response, enumerable: false }); | ||
// Logging method for util.inspect in Node | ||
Object.defineProperty(this, custom, { | ||
value: () => { | ||
// Extract non-enumerable properties and add them back. This is OK since in this output the request and | ||
// response get sanitized. | ||
return `RestError: ${this.message} \n ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { request: this.request, response: this.response }))}`; | ||
}, | ||
enumerable: false, | ||
}); | ||
Object.setPrototypeOf(this, RestError.prototype); | ||
} | ||
/** | ||
* Logging method for util.inspect in Node | ||
*/ | ||
[custom]() { | ||
// Extract non-enumerable properties and add them back. This is OK since in this output the request and | ||
// response get sanitized. | ||
return `RestError: ${this.message} \n ${errorSanitizer.sanitize(Object.assign(Object.assign({}, this), { request: this.request, response: this.response }))}`; | ||
} | ||
} | ||
@@ -34,0 +35,0 @@ /** |
{ | ||
"name": "@azure/core-rest-pipeline", | ||
"version": "1.19.2-alpha.20250317.1", | ||
"version": "1.19.2-alpha.20250318.3", | ||
"description": "Isomorphic client library for making HTTP requests in node.js and browser.", | ||
@@ -113,3 +113,3 @@ "sdk-type": "client", | ||
"playwright": "^1.41.2", | ||
"typescript": "~5.7.2", | ||
"typescript": "~5.8.2", | ||
"vitest": "^3.0.9" | ||
@@ -116,0 +116,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1928031
0.06%