@overmap-ai/core 1.0.65-error-message-fix.0 → 1.0.65-error-message-fix.2

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.
@@ -233,6 +233,7 @@ function extractErrorMessage(errorRes, err) {
233
233
  let ret;
234
234
  if (errorRes == null ? void 0 : errorRes.body) {
235
235
  if (typeof errorRes.body === "object") {
236
+ console.debug("error body is object", errorRes.body);
236
237
  const responseBody = errorRes.body;
237
238
  if (typeof responseBody.error === "string") {
238
239
  console.debug("body.error is string", responseBody.error);
@@ -265,8 +266,10 @@ function extractErrorMessage(errorRes, err) {
265
266
  ret = errorRes.body;
266
267
  }
267
268
  } else if (errorRes == null ? void 0 : errorRes.text) {
269
+ console.debug("error.text", errorRes.text);
268
270
  ret = errorRes.text;
269
271
  } else if (err instanceof Error) {
272
+ console.debug("instance of Error", err.message);
270
273
  ret = err.message;
271
274
  }
272
275
  if (!ret || ret.length > MAX_ERROR_MESSAGE_LENGTH) {