fix: return 400 for invalid protocols and unresolvable hostnames (was 500)
All checks were successful
Build & Deploy to Staging / Build & Deploy to Staging (push) Successful in 9m41s

This commit is contained in:
OpenClawd 2026-02-24 14:00:55 +00:00
parent 5ec8c92413
commit b07b9cfd25
3 changed files with 3 additions and 3 deletions

View file

@ -136,7 +136,7 @@ playgroundRouter.post("/", playgroundLimiter, async (req, res) => {
res.status(504).json({ error: "Screenshot timed out." });
return;
}
if (err.message.includes("blocked") || err.message.includes("not allowed") || err.message.includes("Invalid URL")) {
if (err.message.includes("blocked") || err.message.includes("not allowed") || err.message.includes("Invalid URL") || err.message.includes("Could not resolve")) {
res.status(400).json({ error: err.message });
return;
}