more auth ree
Some checks failed
CI/CD Pipeline / Build and Push PocketBase Docker Image (push) Has been cancelled
CI/CD Pipeline / Build and Push App Docker Image (push) Has been cancelled
CI/CD Pipeline / Deploy to Kubernetes (push) Has been cancelled

This commit is contained in:
yohlo
2026-03-02 22:17:05 -06:00
parent 152235dd14
commit 76306cc937
5 changed files with 50 additions and 7 deletions

View File

@@ -26,6 +26,14 @@ export const toServerResult = async <T>(
const data = await serverFn();
return { success: true, data };
} catch (error) {
if (error && typeof error === 'object' && 'options' in error) {
const redirectError = error as any;
if (redirectError.options?.to && redirectError.options?.statusCode) {
logger.info('toServerResult: Re-throwing TanStack Router redirect', redirectError.options);
throw error;
}
}
const duration = Date.now() - startTime;
logger.error('Server Fn Error', error);