mirror of
https://github.com/Unleash/unleash.git
synced 2025-03-18 00:19:49 +01:00
refactor: change error type in edit context
This commit is contained in:
parent
c141f91abd
commit
4898eee8d8
@ -1,5 +1,6 @@
|
||||
import { useEffect } from 'react';
|
||||
import { useHistory, useParams } from 'react-router-dom';
|
||||
import { formatUnknownError } from 'utils/format-unknown-error';
|
||||
import useContextsApi from '../../../hooks/api/actions/useContextsApi/useContextsApi';
|
||||
import useContext from '../../../hooks/api/getters/useContext/useContext';
|
||||
import useUiConfig from '../../../hooks/api/getters/useUiConfig/useUiConfig';
|
||||
@ -63,8 +64,8 @@ export const EditContext = () => {
|
||||
title: 'Context information updated',
|
||||
type: 'success',
|
||||
});
|
||||
} catch (e: any) {
|
||||
setToastApiError(e.toString());
|
||||
} catch (e: unknown) {
|
||||
setToastApiError(formatUnknownError(e));
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user