Add error handling to refresh token request