{"record":{"id":"de99c32471c737bf","repo":"hashicorp/nomad","slug":"connect-mesh-gateway-mode-q-not-supported","errorCode":null,"errorMessage":"Connect mesh_gateway mode %q not supported","messagePattern":"Connect mesh_gateway mode %q not supported","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/structs/services.go","lineNumber":1779,"sourceCode":"\treturn ConsulMeshGateway{\n\t\tMode: c.Mode,\n\t}\n}\n\nfunc (c *ConsulMeshGateway) Equal(o ConsulMeshGateway) bool {\n\treturn c.Mode == o.Mode\n}\n\nfunc (c *ConsulMeshGateway) Validate() error {\n\tif c == nil {\n\t\treturn nil\n\t}\n\n\tswitch c.Mode {\n\tcase \"local\", \"remote\", \"none\":\n\t\treturn nil\n\tdefault:\n\t\treturn fmt.Errorf(\"Connect mesh_gateway mode %q not supported\", c.Mode)\n\t}\n}\n\n// ConsulUpstream represents a Consul Connect upstream jobspec block.\ntype ConsulUpstream struct {\n\t// DestinationName is the name of the upstream service.\n\tDestinationName string\n\n\t// DestinationNamespace is the namespace of the upstream service.\n\tDestinationNamespace string\n\n\t// DestinationNamespace is the admin partition of the upstream service.\n\tDestinationPartition string\n\n\t// DestinationPeer the destination service address\n\tDestinationPeer string\n\n\t// DestinationType is the type of destination. It can be an IP address,","sourceCodeStart":1761,"sourceCodeEnd":1797,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/structs/services.go#L1761-L1797","documentation":"ConsulMeshGateway.Validate rejected the mesh_gateway mode: only \"local\", \"remote\", and \"none\" are accepted. Anything else in the jobspec connect block's mesh_gateway stanza triggers this.","triggerScenarios":"Thrown at nomad/structs/services.go:1779 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set mesh_gateway.mode to one of \"local\", \"remote\", or \"none\"","Remove the mesh_gateway block if the default (local) behavior is acceptable"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}