@koda-sl/baker-cli 0.158.0 → 0.158.1

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.
@@ -741,7 +741,12 @@ async function parseErrorBody(res) {
741
741
  } catch {
742
742
  }
743
743
  const errObj = body.error ?? {};
744
- return classifyHttpError(res.status, errObj, errObj.message ?? `HTTP ${res.status}`);
744
+ const bodyless = body.error === void 0 && res.status >= 500;
745
+ const message2 = bodyless ? `HTTP ${res.status} with no response body \u2014 the request was dropped before the server answered` : errObj.message ?? `HTTP ${res.status}`;
746
+ if (bodyless && res.status === 502) {
747
+ return { kind: "server", status: res.status, message: message2 };
748
+ }
749
+ return classifyHttpError(res.status, errObj, message2);
745
750
  }
746
751
  function classifyHttpError(status, errObj, message2) {
747
752
  if (errObj.code === CONTENT_POLICY_CODE) {
@@ -8023,4 +8028,4 @@ export {
8023
8028
  defaultRegistry,
8024
8029
  createEngineFromEnv
8025
8030
  };
8026
- //# sourceMappingURL=chunk-7Z6C5OVO.js.map
8031
+ //# sourceMappingURL=chunk-CG6OTNUU.js.map