@koda-sl/baker-cli 0.124.0-dev.31b784126 → 0.124.0-dev.efe965ce2
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/README.md +2 -0
- package/dist/cli.js +14 -1
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2132,6 +2132,8 @@ Auto-ingests with prefetched bytes (no double-fetch). The screenshot bytes thems
|
|
|
2132
2132
|
|
|
2133
2133
|
ScreenshotOne caches captures for 30 days, so re-shotting the same URL within that window returns the cached capture.
|
|
2134
2134
|
|
|
2135
|
+
If the target page is unreachable or returns a non-2xx status (e.g. a 404 path or a login wall), the command fails with an actionable `VALIDATION_ERROR` naming the page and the status it returned, plus a `fix` hint — verify the URL and retry, or continue without the screenshot. It no longer surfaces a generic "Internal server error".
|
|
2136
|
+
|
|
2135
2137
|
**Flags:**
|
|
2136
2138
|
|
|
2137
2139
|
| Flag | Description |
|
package/dist/cli.js
CHANGED
|
@@ -23517,7 +23517,20 @@ var screenshotCommand = defineCommand121({
|
|
|
23517
23517
|
writeJson({ ok: true, data });
|
|
23518
23518
|
} catch (err) {
|
|
23519
23519
|
if (err instanceof ApiError) {
|
|
23520
|
-
|
|
23520
|
+
const isUrlProblem = err.code === "VALIDATION_ERROR" || err.code === "NOT_FOUND";
|
|
23521
|
+
writeJson({
|
|
23522
|
+
ok: false,
|
|
23523
|
+
error: {
|
|
23524
|
+
code: err.code,
|
|
23525
|
+
message: err.message,
|
|
23526
|
+
...isUrlProblem ? {
|
|
23527
|
+
fix: {
|
|
23528
|
+
action: "reject",
|
|
23529
|
+
explanation: "Verify the URL is correct and publicly reachable, then retry with a working address. If the page can't be captured, continue without this screenshot rather than stopping the job."
|
|
23530
|
+
}
|
|
23531
|
+
} : {}
|
|
23532
|
+
}
|
|
23533
|
+
});
|
|
23521
23534
|
process.exit(1);
|
|
23522
23535
|
}
|
|
23523
23536
|
writeJson({ ok: false, error: { code: "INTERNAL_ERROR", message: "Unexpected error" } });
|