Skip to content

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

No need to log status in addition to status code. They are basically the same thing

天舟644713f4309d
diff --git a/server/project.go b/server/project.go
index 16b07e9315..a5bae91a2a 100644
--- a/server/project.go
+++ b/server/project.go
@@ -188,10 +188,9 @@ func (s *Server) registerProjectRoutes(g *echo.Group) {
if resp.StatusCode >= 300 {
return echo.NewHTTPError(http.StatusInternalServerError,
- fmt.Sprintf("Failed to create webhook for project ID: %v, status code: %d, status: %s",
+ fmt.Sprintf("Failed to create webhook for project ID: %v, status code: %d",
repositoryCreate.ProjectId,
resp.StatusCode,
- resp.Status,
))
}
diff --git a/server/task_executor_schema_update.go b/server/task_executor_schema_update.go
index 6fd645b7db..8b3f6cf4bb 100644
--- a/server/task_executor_schema_update.go
+++ b/server/task_executor_schema_update.go
@@ -184,10 +184,9 @@ func (exec *SchemaUpdateTaskExecutor) RunOnce(ctx context.Context, server *Serve
createSchemaFile := false
verb := "Update"
if getResp.StatusCode >= 300 && getResp.StatusCode != 404 {
- return true, "", fmt.Errorf("failed to fetch latest schema file from %s, status code: %d, status: %s",
+ return true, "", fmt.Errorf("failed to fetch latest schema file from %s, status code: %d",
repository.VCS.InstanceURL,
getResp.StatusCode,
- getResp.Status,
)
} else if getResp.StatusCode == 404 {
createSchemaFile = true
@@ -223,12 +222,11 @@ func (exec *SchemaUpdateTaskExecutor) RunOnce(ctx context.Context, server *Serve
defer resp.Body.Close()
if resp.StatusCode >= 300 {
- return true, "", fmt.Errorf("failed to create file %s after applying migration %s to %q, status code: %d, status: %s",
+ return true, "", fmt.Errorf("failed to create file %s after applying migration %s to %q, status code: %d",
filePath,
mi.Version,
databaseName,
resp.StatusCode,
- resp.Status,
)
}
} else {
@@ -250,12 +248,11 @@ func (exec *SchemaUpdateTaskExecutor) RunOnce(ctx context.Context, server *Serve
defer resp.Body.Close()
if resp.StatusCode >= 300 {
- return true, "", fmt.Errorf("failed to create file %s after applying migration %s to %q, status code: %d, status: %s",
+ return true, "", fmt.Errorf("failed to create file %s after applying migration %s to %q, status code: %d",
filePath,
mi.Version,
databaseName,
resp.StatusCode,
- resp.Status,
)
}
}