Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: include url in the error log when failed to refresh oauth token from VCS (#1866)

tianzhou514849067c1c
diff --git a/plugin/vcs/github/github.go b/plugin/vcs/github/github.go
index 772873fc11..e72e30e1d0 100644
--- a/plugin/vcs/github/github.go
+++ b/plugin/vcs/github/github.go
@@ -523,7 +523,7 @@ func tokenRefresher(oauthCtx oauthContext, refresher common.TokenRefresher) oaut
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
- return errors.Errorf("non-200 status code %d with body %q", resp.StatusCode, body)
+ return errors.Errorf("non-200 POST %s status code %d with body %q", url, resp.StatusCode, body)
}
var r refreshOAuthResponse
diff --git a/plugin/vcs/gitlab/gitlab.go b/plugin/vcs/gitlab/gitlab.go
index 99634e5508..a612b7b6b7 100644
--- a/plugin/vcs/gitlab/gitlab.go
+++ b/plugin/vcs/gitlab/gitlab.go
@@ -923,7 +923,7 @@ func tokenRefresher(instanceURL string, oauthCtx oauthContext, refresher common.
}
if resp.StatusCode != http.StatusOK {
- return errors.Errorf("non-200 status code %d with body %q", resp.StatusCode, body)
+ return errors.Errorf("non-200 POST %s status code %d with body %q", url, resp.StatusCode, body)
}
var r refreshOauthResponse