Skip to content

Commit 236afb9

Browse files
edouardbbrmzkw
authored andcommitted
improve error messages
1 parent c025a04 commit 236afb9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/koyeb/services.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -711,8 +711,8 @@ func (h *ServiceHandler) setDefaultPortsAndRoutes(definition *koyeb.DeploymentDe
711711
definition.SetRoutes(h.getDeploymentRoute(8000))
712712

713713
// When one or more ports are set but no route is explicitly configured:
714-
// - if only one HTTP port is defined, create the default route using that port
715-
// - if more than one HTTP port is set, we return an error as we can't determine routes configuration
714+
// - if only one HTTP/HTTP2 port is defined, create the default route using that port
715+
// - if more than one HTTP/HTTP2 port is set, we return an error as we can't determine routes configuration
716716
case len(currentPorts) > 0 && len(currentRoutes) == 0:
717717
httpPorts := []koyeb.DeploymentPort{}
718718

@@ -729,9 +729,9 @@ func (h *ServiceHandler) setDefaultPortsAndRoutes(definition *koyeb.DeploymentDe
729729
if len(httpPorts) > 1 {
730730
return &errors.CLIError{
731731
What: "Error while configuring the service",
732-
Why: `your service has two or more HTTP ports set but no matching routes`,
732+
Why: `your service has two or more HTTP/HTTP2 ports set but no matching routes`,
733733
Additional: []string{
734-
"For each HTTP port, you must specify a matching route with the --routes flag",
734+
"For each HTTP/HTTP2 port, you must specify a matching route with the --routes flag",
735735
},
736736
Orig: nil,
737737
Solution: "Set the routes and try again",

0 commit comments

Comments
 (0)