Retrying http calls after an error