We also improved how we retry getting quotes from our carrier partners if an initial request fails. For carrier partners who use expiring auth tokens, we used to follow a process like this:
- Check the expiration time of the token we have.
- If that time is in the future, use the token to get a quote.
- If that time is in the past, make a request to get a new token.
This approach worked most of the time, but failed on a few rare occasions:
- If the token expired between when we checked and when we used it to get a quote.
- If a carrier partner’s token became expired before the originally-listed time.
- If our request to get a new token failed for unrelated reasons.
We have now updated our logic to retry getting tokens during these rare scenarios, resulting in fewer “unresponsive” statuses and more quotes for our users.