Skip to content

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

chore: expose tenant schema mismatching error (#1833)

p0ny99b5e36005d9
diff --git a/server/database.go b/server/database.go
index 3c698accd3..fee669ad40 100644
--- a/server/database.go
+++ b/server/database.go
@@ -241,7 +241,7 @@ func (s *Server) registerDatabaseRoutes(g *echo.Group) {
return fmt.Errorf("failed to get database schema for database %q: %w", database.Name, err)
}
if peerSchema != schemaBuf.String() {
- return fmt.Errorf("the schema for database %q does not match the peer database schema in the target tenant mode project %q", database.Name, toProject.Name)
+ return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("The schema for database %q does not match the peer database schema in the target tenant mode project %q", database.Name, toProject.Name))
}
}
}