Skip to content

Commit

Permalink
Update ProviderEServiceImportVersionDrawer.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
Carminepo2 committed Dec 20, 2024
1 parent d36baf4 commit 30804f1
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { trackEvent } from '@/config/tracking'
import { useNavigate } from '@/router'
import { Box, FormControlLabel, Link, Stack, Switch, Typography } from '@mui/material'
import { InformationContainer } from '@pagopa/interop-fe-commons'
import { AxiosError } from 'axios'
import { isAxiosError } from 'axios'
import React from 'react'
import { FormProvider, useForm } from 'react-hook-form'
import { Trans, useTranslation } from 'react-i18next'
Expand Down Expand Up @@ -63,12 +63,10 @@ export const ProviderEServiceImportVersionDrawer: React.FC<
})
},
onError: (error) => {
if (error instanceof AxiosError) {
if (error.response) {
trackEvent('INTEROP_ESERVICE_UPLOAD_RESPONSE_ERROR', {
errorCode: error.response.status,
})
}
if (isAxiosError(error) && error.response) {
trackEvent('INTEROP_ESERVICE_UPLOAD_RESPONSE_ERROR', {
errorCode: error.response.status,
})
}
},
}
Expand Down

0 comments on commit 30804f1

Please sign in to comment.