Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 1x 1x | import { AxiosError } from 'axios'
import { HydraErrorWithImportErrors } from './types'
import { notify } from '@/shared/lib'
import { TFunction } from '@tmk/ui-kit'
export const handleDeleteImportError = (data: AxiosError<HydraErrorWithImportErrors>, t: TFunction) => {
const violations = data.response?.data.violations
if (violations?.some(violation => violation.message == t('Error_status_for_delete'))) {
return notify(t('Import_delete_failed_waiting'), {
status: 'error',
})
}
return notify(t('Delete failed'), {
status: 'error',
})
}
|