{"record":{"id":"c81e018a3f5162ee","repo":"hashicorp/nomad","slug":"method-type-q-not-supported-in-nomad-http-check","errorCode":null,"errorMessage":"method type %q not supported in Nomad http check","messagePattern":"method type %q not supported in Nomad http check","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/structs/services.go","lineNumber":384,"sourceCode":"\n\t// below are temporary limitations on checks in nomad\n\t// https://github.com/hashicorp/team-nomad/issues/354\n\n\t// check_restart.ignore_warnings is not a thing in Nomad (which has no warnings in checks)\n\tif sc.CheckRestart != nil {\n\t\tif sc.CheckRestart.IgnoreWarnings {\n\t\t\treturn errors.New(\"ignore_warnings on check_restart only supported for Consul service checks\")\n\t\t}\n\t}\n\n\t// address_mode=\"driver\" not yet supported on nomad\n\tif sc.AddressMode == \"driver\" {\n\t\treturn errors.New(\"address_mode = driver may only be set for Consul service checks\")\n\t}\n\n\tif sc.Type == \"http\" {\n\t\tif sc.Method != \"\" && !helper.IsMethodHTTP(sc.Method) {\n\t\t\treturn fmt.Errorf(\"method type %q not supported in Nomad http check\", sc.Method)\n\t\t}\n\t}\n\n\t// success_before_passing is consul only\n\tif sc.SuccessBeforePassing != 0 {\n\t\treturn errors.New(\"success_before_passing may only be set for Consul service checks\")\n\t}\n\n\t// failures_before_critical is consul only\n\tif sc.FailuresBeforeCritical != 0 {\n\t\treturn errors.New(\"failures_before_critical may only be set for Consul service checks\")\n\t}\n\n\t// failures_before_warning is consul only\n\tif sc.FailuresBeforeWarning != 0 {\n\t\treturn errors.New(\"failures_before_warning may only be set for Consul service checks\")\n\t}\n","sourceCodeStart":366,"sourceCodeEnd":402,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/structs/services.go#L366-L402","documentation":"validateNomad rejected an HTTP check that specifies a `method`; Nomad-native service checks do not support custom HTTP methods (a temporary limitation vs Consul checks).","triggerScenarios":"Thrown at nomad/structs/services.go:384 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the `method` field from Nomad (non-Consul) service checks","Use a Consul service check if a custom method is required"],"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"}