@kata.dev/challenge-cli 1.2.2 → 1.2.3
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/package.json +1 -1
- package/src/lib/polling.js +13 -5
package/package.json
CHANGED
package/src/lib/polling.js
CHANGED
|
@@ -56,6 +56,15 @@ function formatResult(job, jobId) {
|
|
|
56
56
|
lines.push(`${statusIcon} Result: ${statusLabel}`);
|
|
57
57
|
lines.push('');
|
|
58
58
|
|
|
59
|
+
// Show error details for failed/error jobs
|
|
60
|
+
if (job.errorCode) {
|
|
61
|
+
lines.push(chalk.red.bold('Error: ') + chalk.red(job.errorCode));
|
|
62
|
+
if (job.errorMessage) {
|
|
63
|
+
lines.push(chalk.dim(` ${job.errorMessage}`));
|
|
64
|
+
}
|
|
65
|
+
lines.push('');
|
|
66
|
+
}
|
|
67
|
+
|
|
59
68
|
if (job.resultJson) {
|
|
60
69
|
const result = typeof job.resultJson === 'string'
|
|
61
70
|
? JSON.parse(job.resultJson)
|
|
@@ -95,11 +104,10 @@ function formatResult(job, jobId) {
|
|
|
95
104
|
}
|
|
96
105
|
}
|
|
97
106
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
107
|
+
// Show logsPreview for non-completed jobs (errors, failures)
|
|
108
|
+
if (job.status !== 'completed' && job.result && job.result.logsPreview) {
|
|
109
|
+
lines.push(chalk.bold('Logs:'));
|
|
110
|
+
lines.push(chalk.dim(job.result.logsPreview.slice(0, 500)));
|
|
103
111
|
lines.push('');
|
|
104
112
|
}
|
|
105
113
|
|