Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.then(url => {
const options: IRequestOptions = {
proxy: tl.getHttpProxyConfiguration(url),
maxRetries: 5,
allowRetries: true,
presignedUrlPatterns: presignedUrlPatterns
};
return new WebApi(url, new BearerCredentialHandler(accessToken), options);
})
.catch(error => {
.then(url => {
const options: IRequestOptions = {
proxy: tl.getHttpProxyConfiguration(url),
maxRetries: 5,
allowRetries: true,
presignedUrlPatterns: presignedUrlPatterns
};
return new WebApi(url, new BearerCredentialHandler(accessToken), options);
})
.catch(error => {