{"record":{"id":"4c6ee412c53d0b4b","repo":"TechnitiumSoftware/DnsServer","slug":"no-healthcheck-was-configured-for-apprecordnam","errorCode":null,"errorMessage":"No 'healthCheck' was configured for: {appRecordName}","messagePattern":"No 'healthCheck' was configured for: (.+?)","errorType":"exception","errorClass":"FormatException","httpStatus":null,"severity":"error","filePath":"Apps/FailoverApp/Address.cs","lineNumber":177,"sourceCode":"\n        public Task<DnsDatagram?> ProcessRequestAsync(DnsDatagram request, IPEndPoint remoteEP, DnsTransportProtocol protocol, bool isRecursionAllowed, string zoneName, string appRecordName, uint appRecordTtl, string appRecordData)\n        {\n            DnsQuestionRecord question = request.Question[0];\n\n            if (!question.Name.Equals(appRecordName, StringComparison.OrdinalIgnoreCase) && !appRecordName.StartsWith('*'))\n                return Task.FromResult<DnsDatagram?>(null);\n\n            switch (question.Type)\n            {\n                case DnsResourceRecordType.A:\n                case DnsResourceRecordType.AAAA:\n                    {\n                        using JsonDocument jsonDocument = JsonDocument.Parse(appRecordData, _jsonParseOptions);\n                        JsonElement jsonAppRecordData = jsonDocument.RootElement;\n\n                        string? healthCheck = jsonAppRecordData.GetPropertyValue(\"healthCheck\", null);\n                        if (string.IsNullOrEmpty(healthCheck))\n                            throw new FormatException(\"No 'healthCheck' was configured for: \" + appRecordName);\n\n                        Uri? healthCheckUrl = null;\n\n                        if (_healthService!.HealthChecks.TryGetValue(healthCheck, out HealthCheck? hc) && ((hc.Type == HealthCheckType.Https) || (hc.Type == HealthCheckType.Http)) && (hc.Url is null))\n                        {\n                            //read health check url only for http/https type checks and only when app config does not have an url configured\n                            if (jsonAppRecordData.TryGetProperty(\"healthCheckUrl\", out JsonElement jsonHealthCheckUrl) && (jsonHealthCheckUrl.ValueKind == JsonValueKind.String))\n                            {\n                                healthCheckUrl = new Uri(jsonHealthCheckUrl.GetString()!);\n                            }\n                            else\n                            {\n                                if (hc.Type == HealthCheckType.Https)\n                                    healthCheckUrl = new Uri(\"https://\" + question.Name);\n                                else\n                                    healthCheckUrl = new Uri(\"http://\" + question.Name);\n                            }\n                        }","sourceCodeStart":159,"sourceCodeEnd":195,"githubUrl":"https://github.com/TechnitiumSoftware/DnsServer/blob/d0484b6c1e7439cdc53d67d81e9c876cda2ad756/Apps/FailoverApp/Address.cs#L159-L195","documentation":"Thrown by FailoverApp Address.ProcessRequestAsync in the A/AAAA branch when the per-record JSON data has no 'healthCheck' property (or it is empty). FailoverApp needs a named health check to decide which backend address is up, so a record without one is considered malformed and throws FormatException. The name in the message identifies which app record is broken.","triggerScenarios":"An A/AAAA app record under FailoverApp whose 'data' JSON lacks the 'healthCheck' key, e.g. {\"addresses\":[\"1.2.3.4\"]} with no healthCheck reference. This branch is only reached for A/AAAA question types that match the record name.","commonSituations":"Record created from a template that omitted healthCheck, a health check was deleted but the record still references nothing, or a manual JSON edit dropped the field.","solutions":["Open the FailoverApp record named in the message and add a 'healthCheck' key whose value matches a healthCheck defined in the app config.","Confirm the referenced health check exists in the FailoverApp 'healthChecks' section.","If you do not want failover behaviour, remove the A/AAAA record from the FailoverApp zone instead of leaving it half-configured."],"exampleFix":"// before\n{ \"addresses\": [\"10.0.0.1\",\"10.0.0.2\"] }\n// after\n{ \"healthCheck\": \"web\", \"addresses\": [\"10.0.0.1\",\"10.0.0.2\"] }","handlingStrategy":"validation","validationCode":"string? hc = jsonAppRecordData.GetPropertyValue(\"healthCheck\", null);\nif (string.IsNullOrEmpty(hc))\n    throw new ConfigValidationException($\"FailoverApp A/AAAA record '{appRecordName}' is missing the required 'healthCheck' field.\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Require 'healthCheck' on every FailoverApp record before deployment.","Cross-check the referenced id exists in the FailoverApp 'healthChecks' list.","Use a config template that includes the field by default."],"tags":["config","failover","health-check","format-exception"],"backgroundTag":null,"analyzedSha":"d0484b6c1e7439cdc53d67d81e9c876cda2ad756","analyzedAt":"2026-08-13T22:57:35.508Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}