diff options
Diffstat (limited to 'src/vs/platform/request/browser/requestService.ts')
-rw-r--r-- | src/vs/platform/request/browser/requestService.ts | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/vs/platform/request/browser/requestService.ts b/src/vs/platform/request/browser/requestService.ts index 56971e949eb..09c9baec136 100644 --- a/src/vs/platform/request/browser/requestService.ts +++ b/src/vs/platform/request/browser/requestService.ts @@ -24,14 +24,24 @@ export class RequestService implements IRequestService { ) { } - request(options: IRequestOptions, token: CancellationToken): Promise<IRequestContext> { - this.logService.trace('RequestService#request', options.url); + async request(options: IRequestOptions, token: CancellationToken): Promise<IRequestContext> { + this.logService.trace('RequestService#request (browser) - begin', options.url); if (!options.proxyAuthorization) { options.proxyAuthorization = this.configurationService.getValue<string>('http.proxyAuthorization'); } - return request(options, token); + try { + const res = await request(options, token); + + this.logService.trace('RequestService#request (browser) - success', options.url); + + return res; + } catch (error) { + this.logService.error('RequestService#request (browser) - error', options.url, error); + + throw error; + } } async resolveProxy(url: string): Promise<string | undefined> { |