-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Description
When an invalid URL is passed to useFetch, it throws an exception directly. This error isn't captured in the returned error field, nor can it be handled via the provided onError callback.
Throwing exceptions in react hooks also goes against best practices.
Steps To Reproduce
call useFetch with invalid URL,such as http://:8080
Current Behaviour
Throw an exception about invalid URL
Expected Behaviour
return the error in error or pass it into onError
Metadata
Metadata
Assignees
Labels
No labels