mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-10-14 20:01:32 +08:00

* feat: export panel in logs explorer is added * chore: notification is updated when dashboard id is not found while updating * fix: error handling for export panel * fix: layout gap * refactor: remove log * fix: updating log page from update button * fix: redirect with correct operator * fix: redirect wioth query data * fix: refetch list --------- Co-authored-by: Yevhen Shevchenko <y.shevchenko@seedium.io>
20 lines
398 B
TypeScript
20 lines
398 B
TypeScript
import axios from 'axios';
|
|
|
|
import { useNotifications } from './useNotifications';
|
|
|
|
const useAxiosError = (): UseAxiosError => {
|
|
const { notifications } = useNotifications();
|
|
|
|
return (error: unknown): void => {
|
|
if (axios.isAxiosError(error)) {
|
|
notifications.error({
|
|
message: error.message,
|
|
});
|
|
}
|
|
};
|
|
};
|
|
|
|
type UseAxiosError = (error: unknown) => void;
|
|
|
|
export default useAxiosError;
|