To check the behavior of ErrorBoundary, I used axios to send an api get request with the path parameter intentionally missing.
const Container = () => {
return (
<ErrorBoundary>
<SusPense>
<Component/>
</SusPense>
</ErrorBoundary>
)
}
const Component = () => {
const { data } = useTestReactQuery();
return <div>{ data.name }</div>
}
const useTestReactQuery = () => {
return useQuery({
queryKey: ["something"],
queryFn: () => axios.get("wrongURL"),
suspesne: true,
})
}
ErrorBoundary works fine but, I got this Error message. I understand that an error message is displayed in the browser console window, but the error message is still displayed on the screen as shown in the picture below, which is annoying me. I wish there was a way to get rid of it.
version info - react: v18.2.0, @tanstack/react-query: v4.29.3, axios: v1.3.4
I wish there was a way to get rid of this Error message.