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.
@@ -201,14 +201,19 @@ function waitToString(milliseconds) {
201
201
  function errorObjectToString(obj) {
202
202
  const maxLength = 1024;
203
203
  const ellipses = "...";
204
- let str = JSON.stringify(obj, null, 2)
205
- .split("\n")
206
- .map((line) => ` ${line}`)
207
- .join("\n");
208
- if (str.length > maxLength) {
209
- str = `${str.substring(0, maxLength - ellipses.length)}${ellipses}`;
210
- }
211
- return `${str}\n`;
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
- let str = JSON.stringify(obj, null, 2)
197
- .split("\n")
198
- .map((line) => ` ${line}`)
199
- .join("\n");
200
- if (str.length > maxLength) {
201
- str = `${str.substring(0, maxLength - ellipses.length)}${ellipses}`;
202
- }
203
- return `${str}\n`;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microsoft-graph",
3
- "version": "3.9.2",
3
+ "version": "3.9.3",
4
4
  "description": "Microsoft GraphAPI SDK for NodeJS",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",