mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-20 22:00:43 +08:00
Improve node error handling
Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
This commit is contained in:
@@ -109,11 +109,15 @@ export async function loadNodeRoute(
|
||||
},
|
||||
};
|
||||
} catch (error: any) {
|
||||
return {
|
||||
resource: "notFound",
|
||||
params: {
|
||||
title: "Node not found",
|
||||
},
|
||||
};
|
||||
if (error.message === "Failed to fetch") {
|
||||
return {
|
||||
resource: "notFound",
|
||||
params: {
|
||||
title: "Node not found",
|
||||
},
|
||||
};
|
||||
} else {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -447,7 +447,6 @@ test("external markdown link", async ({ page }) => {
|
||||
});
|
||||
await page.goto(`${markdownUrl}/tree/main/footnotes.md`);
|
||||
await page.getByRole("link", { name: "https://example.com" }).click();
|
||||
await page.pause();
|
||||
await expect(page).toHaveURL("https://example.com");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user