When trying to retry with a callback when getting 200 and return true in the callback function - the request will get stuck and will not return a valid response, only if we set a timeout we will finally get an error but the request will not be processed.
you may ask why would one want to retry a request when he got 200, the reason is that an API returns 200, and in the body return an inner status that unfortunately is not reflected in the normal HTTP statues.
When trying to retry with a callback when getting 200 and return true in the callback function - the request will get stuck and will not return a valid response, only if we set a timeout we will finally get an error but the request will not be processed.
you may ask why would one want to retry a request when he got 200, the reason is that an API returns 200, and in the body return an inner status that unfortunately is not reflected in the normal HTTP statues.