gencow 0.1.201 → 0.1.202

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.
@@ -175,6 +175,16 @@ export function isPlatformFetchFallbackEligible(error) {
175
175
  return true;
176
176
  }
177
177
 
178
+ function platformResponseError(body, status) {
179
+ const message =
180
+ body && typeof body === "object" && !Array.isArray(body) && typeof body.error === "string"
181
+ ? body.error.trim()
182
+ : "";
183
+ const error = new Error(message || `HTTP ${status}`);
184
+ error.status = status;
185
+ return error;
186
+ }
187
+
178
188
  export async function resolveRuntimeBomForCli({ creds, releaseId, cwd, platformFetchImpl }, deps = {}) {
179
189
  const existsSyncImpl = deps.existsSyncImpl ?? existsSync;
180
190
  const readFileSyncImpl = deps.readFileSyncImpl ?? readFileSync;
@@ -192,9 +202,7 @@ export async function resolveRuntimeBomForCli({ creds, releaseId, cwd, platformF
192
202
  const res = await platformFetchImpl(creds, path, { method: "GET" });
193
203
  const body = await res.json().catch(() => ({}));
194
204
  if (!res.ok) {
195
- const err = new Error(body.error || `HTTP ${res.status}`);
196
- err.status = res.status;
197
- throw err;
205
+ throw platformResponseError(body, res.status);
198
206
  }
199
207
  return {
200
208
  bom: {
@@ -244,9 +252,7 @@ export async function resolveRuntimeReleaseListForCli({ creds, platformFetchImpl
244
252
  const res = await platformFetchImpl(creds, "/platform/runtime-releases", { method: "GET" });
245
253
  const body = await res.json().catch(() => ({}));
246
254
  if (!res.ok) {
247
- const err = new Error(body.error || `HTTP ${res.status}`);
248
- err.status = res.status;
249
- throw err;
255
+ throw platformResponseError(body, res.status);
250
256
  }
251
257
  return {
252
258
  currentReleaseId: body.currentReleaseId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gencow",
3
- "version": "0.1.201",
3
+ "version": "0.1.202",
4
4
  "description": "Gencow — AI Backend Engine",
5
5
  "type": "module",
6
6
  "bin": {
@@ -33,9 +33,9 @@
33
33
  "devDependencies": {
34
34
  "@types/node": "^25.9.5",
35
35
  "better-auth": "^1.6.23",
36
- "@gencow/core": "0.1.42",
37
- "@gencow/react": "0.2.6",
38
- "@gencow/client": "0.2.6"
36
+ "@gencow/core": "0.1.43",
37
+ "@gencow/react": "0.2.7",
38
+ "@gencow/client": "0.2.7"
39
39
  },
40
40
  "scripts": {
41
41
  "prebuild": "pnpm --filter @gencow/migration-contract run build && pnpm --filter @gencow/server run build",