We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 666fb3a commit 9afaaf2Copy full SHA for 9afaaf2
1 file changed
packages/binding-http/src/http-client-impl.ts
@@ -433,6 +433,9 @@ export default class HttpClient implements ProtocolClient {
433
if (HttpClient.isOAuthTokenExpired(result, this.credential)) {
434
this.credential = await (this.credential as OAuthCredential).refreshToken();
435
return await this._fetch(await this.credential.sign(request));
436
+ } else if (result.status >= 400) {
437
+ // report generic error
438
+ throw new Error(`request to ${request.url} failed, reason: HTTP status result ${result.status} `);
439
}
440
441
return result;
0 commit comments