update axioserror

This commit is contained in:
Proddy
2022-05-01 13:12:40 +02:00
parent 0143e89e27
commit 6b315d52a8
16 changed files with 55 additions and 31 deletions

View File

@@ -81,7 +81,7 @@ const SystemStatusForm: FC = () => {
try {
await SystemApi.restart();
enqueueSnackbar('EMS-ESP is restarting...', { variant: 'info' });
} catch (error: any) {
} catch (error: unknown) {
enqueueSnackbar(extractErrorMessage(error, 'Problem restarting device'), { variant: 'error' });
} finally {
setConfirmRestart(false);
@@ -179,7 +179,7 @@ const SystemStatusForm: FC = () => {
try {
await SystemApi.factoryReset();
enqueueSnackbar('Device has been factory reset and will now restart', { variant: 'info' });
} catch (error: any) {
} catch (error: unknown) {
enqueueSnackbar(extractErrorMessage(error, 'Problem factory resetting the device'), { variant: 'error' });
} finally {
setConfirmFactoryReset(false);