From 229b009b7f5e965dc3586439fe94683428649950 Mon Sep 17 00:00:00 2001 From: Alex Tran Date: Wed, 13 Jul 2022 08:25:43 -0500 Subject: [PATCH] Remove Axios import in web hook.ts --- web/src/hooks.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/web/src/hooks.ts b/web/src/hooks.ts index afb418164..a7f30da70 100644 --- a/web/src/hooks.ts +++ b/web/src/hooks.ts @@ -1,7 +1,6 @@ import type { GetSession, Handle } from '@sveltejs/kit'; import * as cookie from 'cookie'; import { api } from '@api'; -import AxiosError from 'axios'; export const handle: Handle = async ({ event, resolve }) => { const cookies = cookie.parse(event.request.headers.get('cookie') || ''); @@ -31,12 +30,7 @@ export const handle: Handle = async ({ event, resolve }) => { return response; } catch (error) { - if (error instanceof AxiosError) { - console.log('Error validating token'); - return await resolve(event); - } - - console.log('Error parsing session'); + console.log('Error [handle]', error); return await resolve(event); } };