diff --git a/src/app.tsx b/src/app.tsx
index ab433f1bb..583a48ca3 100644
--- a/src/app.tsx
+++ b/src/app.tsx
@@ -23,6 +23,7 @@ import {getPathPrefixIncludingLocale} from "./getPathPrefixIncludingLocale.ts";
import {QueryClient, QueryClientProvider} from "@tanstack/react-query";
import {ReactQueryDevtools} from "@tanstack/react-query-devtools";
import {onLanguageSelect, setParams} from "@navikt/nav-dekoratoren-moduler";
+import {Driftsmeldinger} from "./lib/driftsmeldinger/Driftsmeldinger.tsx";
const queryClient = new QueryClient();
@@ -52,6 +53,7 @@ export default function App() {
return (
}>
+
{
configureLogger({basePath: BASE_PATH});
@@ -20,7 +21,12 @@ const Page = () => {
onLanguageSelect(({locale: language, url}) =>
setParams({language}).then(() => window.location.assign(`${url}${path}`))
);
- return ;
+ return (
+ <>
+
+
+ >
+ );
};
export default Page;
diff --git a/src/lib/driftsmeldinger/getDriftsmeldinger.ts b/src/lib/driftsmeldinger/getDriftsmeldinger.ts
index 2060619f5..4579c441d 100644
--- a/src/lib/driftsmeldinger/getDriftsmeldinger.ts
+++ b/src/lib/driftsmeldinger/getDriftsmeldinger.ts
@@ -9,14 +9,16 @@ export const getDriftsmeldinger = async () => {
driftsmeldingUrl.searchParams.set(DriftsmeldingAudienceParam, DriftsmeldingAudience.soknad);
try {
- const res = await fetch(driftsmeldingUrl.toString(), {signal: AbortSignal.timeout(500)});
+ const res = await fetch(driftsmeldingUrl.toString(), {
+ signal: AbortSignal.timeout(500),
+ });
if (!res.ok) {
logger.warn(`fetching driftsmeldinger: HTTP error response: ${res.status} ${res.statusText}`);
return [];
}
return (await res.json()) as Driftsmelding[];
} catch (e: any) {
- logger.warn("fetching driftsmeldinger: error", e);
+ logger.warn({error: e?.message}, "fetching driftsmeldinger: error");
return [];
}
};