{"record":{"id":"fdee910c0ab858c6","repo":"louislam/uptime-kuma","slug":"no-record-matched","errorCode":null,"errorMessage":"No record matched. ","messagePattern":"No record matched\\. ","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/monitor-types/globalping.js","lineNumber":342,"sourceCode":"        let recordMatched = true;\n\n        // keyword\n        if (monitor.keyword) {\n            recordMatched = this.checkDNSRecordValueMatch(monitor, values, monitor.keyword);\n        }\n\n        if (monitor.dns_last_result !== dnsMessage && dnsMessage !== undefined) {\n            await redbean.exec(\"UPDATE `monitor` SET dns_last_result = ? WHERE id = ? \", [dnsMessage, monitor.id]);\n        }\n\n        heartbeat.ping = result.timings.total || 0;\n\n        if (!dnsMessage) {\n            dnsMessage = `No records found. ${result.statusCodeName}`;\n        }\n\n        if (!recordMatched) {\n            throw new Error(this.formatResponse(probe, \"No record matched. \" + dnsMessage));\n        }\n\n        heartbeat.msg = this.formatResponse(probe, dnsMessage);\n        heartbeat.status = UP;\n    }\n\n    /**\n     * Handles keyword for HTTP monitors.\n     * @param {Monitor} monitor - The monitor object.\n     * @param {Array<string>} values - The values to search for.\n     * @param {string} keyword - The keyword to search for.\n     * @returns {boolean} True if the regex matches, false otherwise.\n     */\n    checkDNSRecordValueMatch(monitor, values, keyword) {\n        const regex = new RegExp(keyword, \"i\");\n\n        switch (monitor.dns_resolve_type) {\n            case \"A\":","sourceCodeStart":324,"sourceCodeEnd":360,"githubUrl":"https://github.com/louislam/uptime-kuma/blob/6b5ea0155793e666666745fb8d6fef1e829543a2/server/monitor-types/globalping.js#L324-L360","documentation":"Thrown by the Globalping DNS monitor path when a keyword filter (monitor.keyword) is set and checkDNSRecordValueMatch found no record matching the keyword regex (case-insensitive). The DNS message (pipe-joined answer values, or 'No records found') is appended so you can see what was actually returned.","triggerScenarios":"monitor.keyword is set, result.answers were returned (or empty), and none of the answer values match new RegExp(keyword, 'i'). Also fires when answers is empty because recordMatched stays false and dnsMessage becomes 'No records found'.","commonSituations":"Keyword regex does not match the actual record values (e.g. expecting an IP that changed), wrong dns_resolve_type so the expected record family is never returned, or the DNS keyword was configured before records existed.","solutions":["Compare the returned dnsMessage against the keyword regex","Confirm dns_resolve_type matches the record family you expect (A vs TXT vs MX)","Loosen or correct the keyword regex; remember it is case-insensitive","If records are genuinely absent, remove the keyword filter or fix the zone"],"exampleFix":"// before: keyword expects old IP\nmonitor.keyword = \"203.0.113.5\"; // record rotated to 198.51.100.2\n// after: match the current value or use a broader regex\nmonitor.keyword = \"198\\\\.51\\\\.100\\\\.\";","handlingStrategy":"validation","validationCode":"// Validate keyword regex compiles before the monitor runs\nif (monitor.keyword) {\n    try { new RegExp(monitor.keyword, \"i\"); } catch {\n        throw new Error(\"DNS keyword is not a valid regex: \" + monitor.keyword);\n    }\n}","typeGuard":null,"tryCatchPattern":"if (!recordMatched) {\n    throw new Error(this.formatResponse(probe, \"No record matched. \" + dnsMessage));\n}","preventionTips":["Match the keyword against the same record family as dns_resolve_type","Use a regex that tolerates value rotation (e.g. prefix, not full IP)","Test the regex against current dig output when records change"],"tags":["globalping","dns","keyword","config"],"backgroundTag":null,"analyzedSha":"6b5ea0155793e666666745fb8d6fef1e829543a2","analyzedAt":"2026-08-12T23:42:12.959Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}