{"record":{"id":"4c95efe2a5684e6d","repo":"portainer/portainer","slug":"missing-service-name-from-the-request-payload","errorCode":null,"errorMessage":"missing service name from the request payload","messagePattern":"missing service name from the request payload","errorType":"validation","errorClass":null,"httpStatus":400,"severity":"error","filePath":"api/http/models/kubernetes/services.go","lineNumber":49,"sourceCode":"\t\tNodePort   int    `json:\"NodePort\"`\n\t\tPort       int    `json:\"Port\"`\n\t\tProtocol   string `json:\"Protocol\"`\n\t\tTargetPort string `json:\"TargetPort\"`\n\t}\n\n\tK8sServiceIngress struct {\n\t\tIP       string `json:\"IP\"`\n\t\tHostname string `json:\"Hostname\"`\n\t}\n\n\t// K8sServiceDeleteRequests is a mapping of namespace names to a slice of\n\t// service names.\n\tK8sServiceDeleteRequests map[string][]string\n)\n\nfunc (s *K8sServiceInfo) Validate(request *http.Request) error {\n\tif s.Name == \"\" {\n\t\treturn errors.New(\"missing service name from the request payload\")\n\t}\n\n\tif s.Namespace == \"\" {\n\t\treturn errors.New(\"missing service namespace from the request payload\")\n\t}\n\n\tif s.Ports == nil {\n\t\treturn errors.New(\"missing service ports from the request payload\")\n\t}\n\n\treturn nil\n}\n\nfunc (r K8sServiceDeleteRequests) Validate(request *http.Request) error {\n\tif len(r) == 0 {\n\t\treturn errors.New(\"missing deletion request list in payload\")\n\t}\n","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/portainer/portainer/blob/17e74456ff6e794b9d5439ec3fa06922aa18a3f8/api/http/models/kubernetes/services.go#L31-L67","documentation":"Error \"missing service name from the request payload\" thrown in portainer/portainer.","triggerScenarios":"Thrown at api/http/models/kubernetes/services.go:49 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"17e74456ff6e794b9d5439ec3fa06922aa18a3f8","analyzedAt":"2026-08-26T23:09:01.915Z","schemaVersion":2},"datasetVersion":"2026-08-27T03:17:27.898Z"}