fix(ui): fix warning

This commit is contained in:
nick-delirium 2023-02-09 13:27:33 +01:00
parent 65ae0dcaf7
commit a65e8cbfb2

View file

@ -34,9 +34,9 @@ export default () => (next) => (action) => {
}
})
.catch(async (e) => {
const data = await e.response.json();
const data = await e.response?.json();
logger.error('Error during API request. ', e);
return next({ type: FAILURE, errors: parseError(data.errors) });
return next({ type: FAILURE, errors: data ? parseError(data.errors) : [] });
});
};