Skip to content

Commit f2165a5

Browse files
1 parent 9afaaf2 commit f2165a5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

packages/binding-http/src/http-client-impl.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,8 @@ export default class HttpClient implements ProtocolClient {
433433
if (HttpClient.isOAuthTokenExpired(result, this.credential)) {
434434
this.credential = await (this.credential as OAuthCredential).refreshToken();
435435
return await this._fetch(await this.credential.sign(request));
436+
} else if (result.status === 401) {
437+
throw new Error("Client error: Unauthorized");
436438
} else if (result.status >= 400) {
437439
// report generic error
438440
throw new Error(`request to ${request.url} failed, reason: HTTP status result ${result.status} `);

0 commit comments

Comments
 (0)