mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-07 07:55:16 +02:00
fix: rethrow NEXT_REDIRECT error
This commit is contained in:
parent
73664e6268
commit
490639309b
1 changed files with 7 additions and 1 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import { redirect } from "next/navigation";
|
||||
import { isNextRouterError } from "next/dist/client/components/is-next-router-error";
|
||||
|
||||
import { getWorkflowsApiV1WorkflowFetchGet } from "@/client/sdk.gen";
|
||||
import SignInClient from "@/components/SignInClient";
|
||||
|
|
@ -43,8 +44,13 @@ export default async function Home() {
|
|||
}
|
||||
}
|
||||
} catch (error) {
|
||||
// Re-throw navigation errors (redirects, not found, etc.) - they're intentional
|
||||
if (isNextRouterError(error)) {
|
||||
throw error;
|
||||
}
|
||||
|
||||
logger.error('[HomePage] Error checking workflows for local provider:', error);
|
||||
// Default to create-workflow on error
|
||||
// Default to create-workflow on actual errors
|
||||
logger.debug('[HomePage] Defaulting to /create-workflow due to error');
|
||||
redirect('/create-workflow');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue