T
TanStack10mo ago
eastern-cyan

Issue in post data with mutate

i have an issue with posting data using mutate in this i set the api response 200 ok for success and 400 bad request for failure when the handle create button click it call the api when is api response is 400 it send the input validation response given in the image in this case i use this response as error text for the input box the issue is when this error occurs, the state is set to true in actual case , in my case the state is updated only after some times and it execute the else part of handle next button click and it always show success if an error occurs how to solve this
No description
No description
No description
No description
No description
2 Replies
foreign-sapphire
foreign-sapphire10mo ago
Hi I am intersted on your post.
eastern-cyan
eastern-cyanOP10mo ago
Any additional information needed?

Did you find this page helpful?