@hey-api/shared 0.0.0-next-20260219115807 → 0.0.0-next-20260220173109

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.mjs CHANGED
@@ -1387,9 +1387,10 @@ async function getSpec({ fetchOptions, inputPath, timeout, watch }) {
1387
1387
  };
1388
1388
  response = request.response;
1389
1389
  } catch (error) {
1390
+ const message = error instanceof Error ? error.message : String(error);
1390
1391
  return {
1391
1392
  error: "not-ok",
1392
- response: new Response(error instanceof Error ? error.message : String(error))
1393
+ response: new Response(message, { status: 500 })
1393
1394
  };
1394
1395
  }
1395
1396
  if (!response.ok && watch.isHeadMethodSupported) return {
@@ -1435,9 +1436,10 @@ async function getSpec({ fetchOptions, inputPath, timeout, watch }) {
1435
1436
  };
1436
1437
  response = request.response;
1437
1438
  } catch (error) {
1439
+ const message = error instanceof Error ? error.message : String(error);
1438
1440
  return {
1439
1441
  error: "not-ok",
1440
- response: new Response(error instanceof Error ? error.message : String(error))
1442
+ response: new Response(message, { status: 500 })
1441
1443
  };
1442
1444
  }
1443
1445
  if (!response.ok) return {