Skip to content

Commit 630e8b8

Browse files
authored
fix: clarify error for init/join on clustered host (#497)
1 parent d8350fa commit 630e8b8

14 files changed

Lines changed: 69 additions & 66 deletions

File tree

‎api/apiv1/design/api.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var _ = g.API("control-plane", func() {
2323
g.Meta("openapi:json:indent", " ")
2424

2525
// Common errors
26-
g.Error("cluster_already_initialized", APIError)
26+
g.Error("host_already_in_cluster", APIError)
2727
g.Error("cluster_not_initialized", APIError)
2828
g.Error("database_not_modifiable", APIError)
2929
g.Error("invalid_input", APIError)
@@ -33,7 +33,7 @@ var _ = g.API("control-plane", func() {
3333
g.Error("server_error", APIError)
3434
g.Error("operation_not_supported", APIError)
3535
g.HTTP(func() {
36-
g.Response("cluster_already_initialized", http.StatusConflict)
36+
g.Response("host_already_in_cluster", http.StatusConflict)
3737
g.Response("cluster_not_initialized", http.StatusConflict)
3838
g.Response("database_not_modifiable", http.StatusConflict)
3939
g.Response("invalid_input", http.StatusBadRequest)
@@ -72,7 +72,7 @@ var _ = g.Service("control-plane", func() {
7272

7373
g.Payload(InitClusterRequest)
7474
g.Result(ClusterJoinToken)
75-
g.Error("cluster_already_initialized")
75+
g.Error("host_already_in_cluster")
7676
g.Error("operation_not_supported")
7777

7878
g.HTTP(func() {
@@ -88,7 +88,7 @@ var _ = g.Service("control-plane", func() {
8888
g.Description("Joins this host to an existing cluster.")
8989
g.Meta("openapi:summary", "Join cluster")
9090
g.Payload(ClusterJoinToken)
91-
g.Error("cluster_already_initialized")
91+
g.Error("host_already_in_cluster")
9292
g.Error("invalid_join_token")
9393
g.Error("invalid_input")
9494

‎api/apiv1/gen/control_plane/client.go‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎api/apiv1/gen/control_plane/service.go‎

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎api/apiv1/gen/http/control_plane/client/encode_decode.go‎

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎api/apiv1/gen/http/control_plane/client/types.go‎

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎api/apiv1/gen/http/control_plane/server/encode_decode.go‎

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎api/apiv1/gen/http/control_plane/server/types.go‎

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎api/apiv1/gen/http/openapi3.json‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎api/apiv1/gen/http/openapi3.yaml‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
kind: Changed
2+
body: Renamed the `cluster_already_initialized` error returned by the init and join cluster endpoints to `host_already_in_cluster` with a clearer message.
3+
time: 2026-10-29T00:00:00.000000+00:00

0 commit comments

Comments
 (0)