2026-01-26 11:15:52 -05:00

23 lines
548 B
TypeScript

import { kratosServerClient } from '$lib/kratos-server';
import type { PageServerLoad } from './$types';
export const load: PageServerLoad = async ({ url }) => {
const flowId = url.searchParams.get('id');
if (!flowId) {
return {
errorMessage: 'An error occurred. Please try again.'
};
}
try {
const { data: flow } = await kratosServerClient.getFlowError({ id: flowId });
return { flow };
} catch (error) {
console.error('Error flow error:', error);
return {
errorMessage: 'An error occurred. Please try again.'
};
}
};