message: fix(origin-ui-device-data): catch errors from first i-rec request when registering device
diff: @@ -13,6 +13,7 @@ import { TRegisterDeviceFormValues } from '../types';
  import { decomposeForIRec, decomposeForOrigin } from '../utils';
  import { useTranslation } from 'react-i18next';
  import { useNavigate } from 'react-router-dom';
  +import { AxiosError } from 'axios';
  export const useApiRegisterDevice = () => {
  const { t } = useTranslation();
  @@ -28,7 +29,8 @@ export const useApiRegisterDevice = () => {
  const iRecCreateData = decomposeForIRec(values, user.organization);
  const originCreateData = decomposeForOrigin(values);
  - mutateAsync({ data: iRecCreateData }).then((createdIRecDevice) => {
  + mutateAsync({ data: iRecCreateData })
  + .then((createdIRecDevice) => {
  mutate(
  {
  data: {
  @@ -54,6 +56,14 @@ export const useApiRegisterDevice = () => {
  },
  }
  );
  + })
  + .catch((error: AxiosError) => {
  + showNotification(
  + `${t('device.register.notifications.registerError')}:
  + ${error?.response?.data?.message || ''}
  + `,
  + NotificationTypeEnum.Error
  + );
  });
  };
  