Automatically retrying failed requests due to expired credentials