mirror of
https://github.com/Unleash/unleash.git
synced 2025-04-10 01:16:39 +02: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 { useEffect } from 'react';
|
||||||
import { useHistory, useParams } from 'react-router-dom';
|
import { useHistory, useParams } from 'react-router-dom';
|
||||||
|
import { formatUnknownError } from 'utils/format-unknown-error';
|
||||||
import useContextsApi from '../../../hooks/api/actions/useContextsApi/useContextsApi';
|
import useContextsApi from '../../../hooks/api/actions/useContextsApi/useContextsApi';
|
||||||
import useContext from '../../../hooks/api/getters/useContext/useContext';
|
import useContext from '../../../hooks/api/getters/useContext/useContext';
|
||||||
import useUiConfig from '../../../hooks/api/getters/useUiConfig/useUiConfig';
|
import useUiConfig from '../../../hooks/api/getters/useUiConfig/useUiConfig';
|
||||||
@ -63,8 +64,8 @@ export const EditContext = () => {
|
|||||||
title: 'Context information updated',
|
title: 'Context information updated',
|
||||||
type: 'success',
|
type: 'success',
|
||||||
});
|
});
|
||||||
} catch (e: any) {
|
} catch (e: unknown) {
|
||||||
setToastApiError(e.toString());
|
setToastApiError(formatUnknownError(e));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user