Sample code
createResource({
url: "https://example.com",
auto: true,
validate() {
return "Sample error";
},
onError(error) {
alert(error);
},
});
Expected
One alert with 'Sample error'
Result
Gets two alerts with 'Sample error'
Possible cause
handleError is getting called twice from here. The second call might be due to error thrown from handleError
Possible fix
Remove error thrown from handleError?