fix(share): redirect unknown qr share tokens home instead of 404

This commit is contained in:
ephraimduncan
2026-07-02 15:58:26 +00:00
parent 3283251c3f
commit 62541f81b2
@@ -199,6 +199,12 @@ export const loader = async ({ request, params: { slug } }: Route.LoaderArgs) =>
userAgent: requestMetadata.userAgent,
});
// Unknown/invalid tokens keep the pre-existing public contract of
// redirecting home. Policy denials below render status-coded pages.
if (code === 'QR_VIEW_NOT_FOUND') {
throw redirect('/');
}
throw createQrShareErrorResponse({
status,
code,