microsoft-graph 3.9.2 → 3.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/services/http.js +13 -8
- package/dist/esm/services/http.js +13 -8
- package/package.json +1 -1
|
@@ -201,14 +201,19 @@ function waitToString(milliseconds) {
|
|
|
201
201
|
function errorObjectToString(obj) {
|
|
202
202
|
const maxLength = 1024;
|
|
203
203
|
const ellipses = "...";
|
|
204
|
-
|
|
205
|
-
.
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
204
|
+
try {
|
|
205
|
+
let str = JSON.stringify(obj, null, 2)
|
|
206
|
+
.split("\n")
|
|
207
|
+
.map((line) => ` ${line}`)
|
|
208
|
+
.join("\n");
|
|
209
|
+
if (str.length > maxLength) {
|
|
210
|
+
str = `${str.substring(0, maxLength - ellipses.length)}${ellipses}`;
|
|
211
|
+
}
|
|
212
|
+
return `${str}\n`;
|
|
213
|
+
}
|
|
214
|
+
catch (_) {
|
|
215
|
+
return "<not displayable>\n";
|
|
216
|
+
}
|
|
212
217
|
}
|
|
213
218
|
function handleResponseError(response, errorLog, attempts, operationIndex = null) {
|
|
214
219
|
const error = response.data;
|
|
@@ -193,14 +193,19 @@ function waitToString(milliseconds) {
|
|
|
193
193
|
function errorObjectToString(obj) {
|
|
194
194
|
const maxLength = 1024;
|
|
195
195
|
const ellipses = "...";
|
|
196
|
-
|
|
197
|
-
.
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
196
|
+
try {
|
|
197
|
+
let str = JSON.stringify(obj, null, 2)
|
|
198
|
+
.split("\n")
|
|
199
|
+
.map((line) => ` ${line}`)
|
|
200
|
+
.join("\n");
|
|
201
|
+
if (str.length > maxLength) {
|
|
202
|
+
str = `${str.substring(0, maxLength - ellipses.length)}${ellipses}`;
|
|
203
|
+
}
|
|
204
|
+
return `${str}\n`;
|
|
205
|
+
}
|
|
206
|
+
catch (_) {
|
|
207
|
+
return "<not displayable>\n";
|
|
208
|
+
}
|
|
204
209
|
}
|
|
205
210
|
function handleResponseError(response, errorLog, attempts, operationIndex = null) {
|
|
206
211
|
const error = response.data;
|