You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are you submitting a bug report or a feature request?
Bug report
What is the current behavior?
chaining error result in an act warning that could not be resolved, even though test was completed with the correct behavior.
here's how my handleSubmit looks like
`
// In api file
export const fetchSomething = () => {
return fetch('/somewhere')
.then((result) => doSomethingWithResult(result))
.catch((e) => {
alert(e.message);
throw e; // rethrow the error, so that the 2nd then doesnt run
})
}
// in component
const handleSubmit = () => {
return fetchSomething();
.then(() => showSuccessMessage()); // this should only run if the catch dint happen in the api file
.catch(() => {}); // Do nothing since the 1st catch should have stopped the 2nd then, this is just so that all errors are caught
}
`
What is the expected behavior?
No error thrown
Sandbox Link
Sorry, tried to create one in codesandbox.io, but couldn't run the test suite properly.
What's your environment?
React 18, react dome 18, react final form 6.5.9, final form 4.20.7
Other information
The text was updated successfully, but these errors were encountered:
Are you submitting a bug report or a feature request?
Bug report
What is the current behavior?
chaining error result in an act warning that could not be resolved, even though test was completed with the correct behavior.
here's how my handleSubmit looks like
`
// In api file
export const fetchSomething = () => {
return fetch('/somewhere')
.then((result) => doSomethingWithResult(result))
.catch((e) => {
alert(e.message);
throw e; // rethrow the error, so that the 2nd then doesnt run
})
}
// in component
const handleSubmit = () => {
return fetchSomething();
.then(() => showSuccessMessage()); // this should only run if the catch dint happen in the api file
.catch(() => {}); // Do nothing since the 1st catch should have stopped the 2nd then, this is just so that all errors are caught
}
`
What is the expected behavior?
No error thrown
Sandbox Link
Sorry, tried to create one in codesandbox.io, but couldn't run the test suite properly.
What's your environment?
React 18, react dome 18, react final form 6.5.9, final form 4.20.7
Other information
The text was updated successfully, but these errors were encountered: