@tryarcanist/cli 0.1.275 → 0.1.277
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 +6 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7400,7 +7400,12 @@ function parseConflictBody(err) {
|
|
|
7400
7400
|
if (!(err instanceof ApiError) || err.status !== 409) return null;
|
|
7401
7401
|
try {
|
|
7402
7402
|
const parsed = JSON.parse(err.body);
|
|
7403
|
-
|
|
7403
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return null;
|
|
7404
|
+
const body = parsed;
|
|
7405
|
+
return {
|
|
7406
|
+
...typeof body.error === "string" ? { error: body.error } : {},
|
|
7407
|
+
...typeof body.reason === "string" ? { reason: body.reason } : {}
|
|
7408
|
+
};
|
|
7404
7409
|
} catch {
|
|
7405
7410
|
return null;
|
|
7406
7411
|
}
|