diff --git a/pages/api/innsending/soknadinnsending.ts b/pages/api/innsending/soknadinnsending.ts index b5203c08..019cc0a6 100644 --- a/pages/api/innsending/soknadinnsending.ts +++ b/pages/api/innsending/soknadinnsending.ts @@ -135,6 +135,9 @@ export const sendSoknadViaAapInnsending = async ( return søknad; } catch (error) { logError('Noe gikk galt ved innsending av søknad', error); + if (error instanceof ErrorMedStatus) { + throw error; + } throw new Error('Error sending søknad via aap-innsending'); } };