How to use correctly useMutation from react-query get error and success notifications