From f577cd3e4d5bf6d17905eb9630a96de8df1f5271 Mon Sep 17 00:00:00 2001 From: Jacek Date: Fri, 22 Nov 2024 15:33:15 -0600 Subject: [PATCH 1/3] feat: notFound error --- packages/nextjs/src/server/protect.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nextjs/src/server/protect.ts b/packages/nextjs/src/server/protect.ts index 7e17e37817..4e5e100159 100644 --- a/packages/nextjs/src/server/protect.ts +++ b/packages/nextjs/src/server/protect.ts @@ -65,14 +65,14 @@ export function createProtect(opts: { // TODO: Handle runtime values. What happens if runtime values are set in middleware and in ClerkProvider as well? return redirectToSignIn(); } - return notFound(); + notFound(); }; const handleUnauthorized = () => { if (unauthorizedUrl) { return redirect(unauthorizedUrl); } - return notFound(); + notFound(); }; /** From c640f25a47b6f0803062e7d52b5720eb1865e326 Mon Sep 17 00:00:00 2001 From: Jacek Date: Fri, 22 Nov 2024 15:34:00 -0600 Subject: [PATCH 2/3] WIP --- packages/nextjs/src/server/protect.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/nextjs/src/server/protect.ts b/packages/nextjs/src/server/protect.ts index 4e5e100159..3f26166631 100644 --- a/packages/nextjs/src/server/protect.ts +++ b/packages/nextjs/src/server/protect.ts @@ -66,6 +66,7 @@ export function createProtect(opts: { return redirectToSignIn(); } notFound(); + return; }; const handleUnauthorized = () => { @@ -73,6 +74,7 @@ export function createProtect(opts: { return redirect(unauthorizedUrl); } notFound(); + return; }; /** From 424ea717b7ea6f4efaa2263c9ac906f82021ecfa Mon Sep 17 00:00:00 2001 From: Jacek Date: Sat, 23 Nov 2024 08:50:09 -0600 Subject: [PATCH 3/3] WIP --- .changeset/strong-carrots-build.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .changeset/strong-carrots-build.md diff --git a/.changeset/strong-carrots-build.md b/.changeset/strong-carrots-build.md new file mode 100644 index 0000000000..a845151cc8 --- /dev/null +++ b/.changeset/strong-carrots-build.md @@ -0,0 +1,2 @@ +--- +---