Skip to content

Commit

Permalink
Merge pull request #733 from navikt/azureAdFix
Browse files Browse the repository at this point in the history
logger 401
  • Loading branch information
stianStensli authored Aug 29, 2022
2 parents c854567 + d562f6c commit 49fb29c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ducks/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {OversiktType} from './ui/listevisning';
import {logEvent} from '../utils/frontend-logger';

export const STATUS = {
NOT_STARTED: 'NOT_STARTED',
Expand All @@ -23,6 +24,10 @@ export function sjekkStatuskode(response) {
}
if (response.status === 401) {
if (!window.location.href.toString().includes('401.html')) {
const urlUtenFnr = response?.url?.replace(/\d{11}/, '');
logEvent('portefolje.logger.innlogging', {
url: urlUtenFnr
});
window.location.href = '/401.html';
}
}
Expand Down

0 comments on commit 49fb29c

Please sign in to comment.