This commit is contained in:
Skye 2022-11-26 15:36:20 +09:00
parent c97559a6b0
commit 8e3bea9429
Signed by: me
GPG key ID: 0104BC05F41B77B8
2 changed files with 7 additions and 13 deletions

View file

@ -10,9 +10,7 @@ export const load: PageServerLoad = async ({ url, request }) => {
throw redirect(303, DEFAULT_REDIRECT_URL); throw redirect(303, DEFAULT_REDIRECT_URL);
} }
const { data: error } = await KratosPublicApi.getSelfServiceError( const { data: error } = await KratosPublicApi.getSelfServiceError(id).catch((e) => {
id
).catch((e) => {
console.log(e); console.log(e);
throw redirect(303, DEFAULT_REDIRECT_URL); throw redirect(303, DEFAULT_REDIRECT_URL);
}); });

View file

@ -6,16 +6,12 @@
</script> </script>
<div class="flex h-full justify-center"> <div class="flex h-full justify-center">
<div <div class="place-self-center space-y-2 max-w-sm">
class="place-self-center space-y-2 max-w-sm"
>
<h1 class="text-xl font-bold text-error">An Error Occurred</h1> <h1 class="text-xl font-bold text-error">An Error Occurred</h1>
{data.error.message} {data.error.message}
<div role="group" class="collapse collapse-arrow"> <div role="group" class="collapse collapse-arrow">
<input id="collapse" type="checkbox" /> <input id="collapse" type="checkbox" />
<label for="collapse" class="collapse-title text-sm font-medium"> <label for="collapse" class="collapse-title text-sm font-medium"> Details </label>
Details
</label>
<div class="collapse-content"> <div class="collapse-content">
<code class="whitespace-normal break-all">{JSON.stringify(data)}</code> <code class="whitespace-normal break-all">{JSON.stringify(data)}</code>
</div> </div>