@opengeni/codex 0.2.29 → 0.2.30-canary.36919050519001

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/index.js CHANGED
@@ -1526,6 +1526,9 @@ async function bufferCodexErrorResponse(res) {
1526
1526
  try {
1527
1527
  const parsed = JSON.parse(bodyText);
1528
1528
  errorType = typeof parsed.error?.type === "string" ? parsed.error.type : void 0;
1529
+ if (parsed.error === void 0 && typeof parsed.detail === "string") {
1530
+ responseBody = JSON.stringify({ ...parsed, error: { message: parsed.detail } });
1531
+ }
1529
1532
  } catch {
1530
1533
  }
1531
1534
  if (truncated) {