@overmap-ai/core 1.0.65-error-message-fix.1 → 1.0.65-error-message-fix.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.
@@ -221,6 +221,7 @@ var __publicField = (obj, key, value) => {
221
221
  let ret;
222
222
  if (errorRes == null ? void 0 : errorRes.body) {
223
223
  if (typeof errorRes.body === "object") {
224
+ console.debug("error body is object", errorRes.body);
224
225
  const responseBody = errorRes.body;
225
226
  if (typeof responseBody.error === "string") {
226
227
  console.debug("body.error is string", responseBody.error);
@@ -228,9 +229,9 @@ var __publicField = (obj, key, value) => {
228
229
  } else if (typeof responseBody.message === "string") {
229
230
  console.debug("body.message is string", responseBody.message);
230
231
  ret = responseBody.message;
231
- } else if (responseBody.body) {
232
+ } else {
232
233
  try {
233
- ret = Object.entries(responseBody.body).map(([key, value]) => {
234
+ ret = Object.entries(responseBody).map(([key, value]) => {
234
235
  if (typeof value === "string") {
235
236
  if (_SPECIAL_KEYS.includes(key))
236
237
  return value;