fix(web): don't log unauthorized errors (#1871)

* fix(web): don't log unauthorized errors

* fix docker build error
This commit is contained in:
Michel Heusschen
2023-02-26 17:50:18 +01:00
committed by GitHub
parent 3d468c369c
commit e157a69d86
2 changed files with 22 additions and 13 deletions

View File

@@ -1,12 +1,5 @@
import type { LayoutServerLoad } from './$types';
export const load = (async ({ locals: { api } }) => {
try {
const { data: user } = await api.userApi.getMyUserInfo();
return { user };
} catch (e) {
console.error('[ERROR] layout.server.ts [LayoutServerLoad]: ');
return { user: undefined };
}
export const load = (async ({ locals: { user } }) => {
return { user };
}) satisfies LayoutServerLoad;