Remove Axios import in web hook.ts
This commit is contained in:
parent
bece6253d5
commit
229b009b7f
1 changed files with 1 additions and 7 deletions
|
@ -1,7 +1,6 @@
|
||||||
import type { GetSession, Handle } from '@sveltejs/kit';
|
import type { GetSession, Handle } from '@sveltejs/kit';
|
||||||
import * as cookie from 'cookie';
|
import * as cookie from 'cookie';
|
||||||
import { api } from '@api';
|
import { api } from '@api';
|
||||||
import AxiosError from 'axios';
|
|
||||||
|
|
||||||
export const handle: Handle = async ({ event, resolve }) => {
|
export const handle: Handle = async ({ event, resolve }) => {
|
||||||
const cookies = cookie.parse(event.request.headers.get('cookie') || '');
|
const cookies = cookie.parse(event.request.headers.get('cookie') || '');
|
||||||
|
@ -31,12 +30,7 @@ export const handle: Handle = async ({ event, resolve }) => {
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error instanceof AxiosError) {
|
console.log('Error [handle]', error);
|
||||||
console.log('Error validating token');
|
|
||||||
return await resolve(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log('Error parsing session');
|
|
||||||
return await resolve(event);
|
return await resolve(event);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue