From a2b07520766b7e1a48a90826432f556f007e70e4 Mon Sep 17 00:00:00 2001 From: openhands Date: Tue, 4 Aug 2026 19:27:08 +0200 Subject: [PATCH] fix: catch FlareSolverr fallback errors in fetchSourceFurnidata Previously, if FlareSolverr itself failed (timeout, connection error), the error would propagate as generic 'network error'. Now it throws a descriptive error message. --- src/lib/services/clone-import.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/services/clone-import.ts b/src/lib/services/clone-import.ts index 8c4891ef..2d0cf36b 100644 --- a/src/lib/services/clone-import.ts +++ b/src/lib/services/clone-import.ts @@ -104,7 +104,13 @@ export async function fetchSourceFurnidata( body = await fetchWithFlareSolver(url); } } catch { - body = await fetchWithFlareSolver(url); + try { + body = await fetchWithFlareSolver(url); + } catch (err) { + throw new Error( + `FlareSolverr fallback failed for ${url}: ${(err as Error).message}`, + ); + } } if (body.trimStart().startsWith("<")) { throw new Error(