From 099d1dff6c9983cc43c1cc093f9ef9d5ee266e9f Mon Sep 17 00:00:00 2001 From: contradiction29 Date: Tue, 14 May 2024 14:05:14 +0900 Subject: [PATCH] Update: Change error omit style MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `throw new Error`だとページの読み込みがとまるため、console.errorに変更した --- app/routes/_layout.archives.$postId.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/routes/_layout.archives.$postId.tsx b/app/routes/_layout.archives.$postId.tsx index 0b661a29..3746e424 100644 --- a/app/routes/_layout.archives.$postId.tsx +++ b/app/routes/_layout.archives.$postId.tsx @@ -79,7 +79,7 @@ export async function loader({ request }:LoaderFunctionArgs){ let similarPosts = []; if (error) { - throw new Response(`Internal Server Error : Failed to fetch similar posts, ${error.message}`, { status: 500 }); + console.error(error.code, error.message); }else{ similarPosts = data.slice(1,); }