@kitsi/action 0.0.8 → 0.0.10
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 +18 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -104195,11 +104195,28 @@ class PlanRunner {
|
|
|
104195
104195
|
step: step2.name,
|
|
104196
104196
|
status: "failed",
|
|
104197
104197
|
duration: (Date.now() - stepStart) / 1000,
|
|
104198
|
-
error:
|
|
104198
|
+
error: this.formatStepError(error2)
|
|
104199
104199
|
});
|
|
104200
104200
|
throw error2;
|
|
104201
104201
|
}
|
|
104202
104202
|
}
|
|
104203
|
+
formatStepError(error2) {
|
|
104204
|
+
if (error2 instanceof Error) {
|
|
104205
|
+
return error2.message;
|
|
104206
|
+
}
|
|
104207
|
+
if (error2 && typeof error2 === "object") {
|
|
104208
|
+
const message = error2.message;
|
|
104209
|
+
if (typeof message === "string") {
|
|
104210
|
+
return message;
|
|
104211
|
+
}
|
|
104212
|
+
try {
|
|
104213
|
+
return JSON.stringify(error2);
|
|
104214
|
+
} catch {
|
|
104215
|
+
return String(error2);
|
|
104216
|
+
}
|
|
104217
|
+
}
|
|
104218
|
+
return String(error2);
|
|
104219
|
+
}
|
|
104203
104220
|
toOp(value) {
|
|
104204
104221
|
if (value instanceof CommandBuilder) {
|
|
104205
104222
|
return value.op;
|