refactor: enhance logging in auth handler to include detailed response information for better debugging

This commit is contained in:
Rotimi Best
2026-05-20 13:51:23 +01:00
parent f7d6f81901
commit e66a8d8441
2 changed files with 13 additions and 2 deletions
+12 -1
View File
@@ -104,7 +104,18 @@ export const app = new Hono()
const response = await auth.handler(request);
if (response.status >= 300 && response.status < 400) {
console.log('[auth-handler]', c.req.method, c.req.path, '→', response.status, response.headers.get('location'));
const location = response.headers.get('location') ?? '';
const setCookies = response.headers.get('set-cookie') ?? '';
console.log(
'[auth-handler]',
c.req.method,
c.req.path,
'→',
response.status,
`location.length=${location.length}`,
`setCookie.length=${setCookies.length}`,
`location[0..200]=${location.slice(0, 200)}`
);
}
return response;
@@ -274,7 +274,7 @@
{#if !isLoaded}
{#if $lessonVideoUpload.isUploading}
<div
class="border-primary-300 flex h-full w-full flex-col items-center justify-center rounded-xl border border-dashed"
class="border-primary-300 flex h-full w-full flex-col items-center justify-center rounded-xl border border-dashed py-4"
>
<div class="flex w-full max-w-[500px] flex-col items-center gap-5 px-6 text-center">
<p>