{"record":{"id":"f730a554fd3acfaa","repo":"louislam/uptime-kuma","slug":"retry-interval-cannot-be-less-than-min-interval","errorCode":null,"errorMessage":"Retry interval cannot be less than ${MIN_INTERVAL_SECOND} seconds","messagePattern":"Retry interval cannot be less than (.+?) seconds","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"server/model/monitor.js","lineNumber":1631,"sourceCode":"        if (parent != null) {\n            return await Monitor.isUnderMaintenance(parent.id);\n        }\n\n        return false;\n    }\n\n    /**\n     * Validate monitor configuration\n     * @returns {void}\n     * @throws {Error} If validation fails\n     */\n    validate() {\n        if (this.interval < MIN_INTERVAL_SECOND) {\n            throw new Error(`Interval cannot be less than ${MIN_INTERVAL_SECOND} seconds`);\n        }\n\n        if (this.retryInterval < MIN_INTERVAL_SECOND) {\n            throw new Error(`Retry interval cannot be less than ${MIN_INTERVAL_SECOND} seconds`);\n        }\n\n        if (this.response_max_length !== undefined) {\n            if (this.response_max_length < 0) {\n                throw new Error(`Response max length cannot be less than 0`);\n            }\n\n            if (this.response_max_length > RESPONSE_BODY_LENGTH_MAX) {\n                throw new Error(`Response max length cannot be more than ${RESPONSE_BODY_LENGTH_MAX} bytes`);\n            }\n        }\n\n        // Validate JSON fields to prevent invalid JSON from being stored in database\n        if (this.kafkaProducerBrokers) {\n            try {\n                JSON.parse(this.kafkaProducerBrokers);\n            } catch (e) {\n                throw new Error(`Kafka Producer Brokers must be valid JSON: ${e.message}`);","sourceCodeStart":1613,"sourceCodeEnd":1649,"githubUrl":"https://github.com/louislam/uptime-kuma/blob/6b5ea0155793e666666745fb8d6fef1e829543a2/server/model/monitor.js#L1613-L1649","documentation":"validate() rejects monitor.retryInterval below MIN_INTERVAL_SECOND (currently 1). Runs on addMonitor/editMonitor save.","triggerScenarios":"Calling addMonitor/editMonitor with retryInterval set to 0, negative, or below 1 second.","commonSituations":"Imported backup with a zero retryInterval; manual API call omitting the field defaulting badly; fork with different limits.","solutions":["Set retryInterval to at least MIN_INTERVAL_SECOND (1s); typically set it equal to or a fraction of interval","Sanitize imported monitor data so retryInterval is >=1"],"exampleFix":"// before\nmonitor.retryInterval = 0;\n\n// after\nmonitor.retryInterval = 20;","handlingStrategy":"validation","validationCode":"const MIN_INTERVAL_SECOND = 1;\nif (monitor.retryInterval < MIN_INTERVAL_SECOND) throw new Error(`retryInterval must be >= ${MIN_INTERVAL_SECOND}`);","typeGuard":"function isValidRetryInterval(v) { return Number.isFinite(v) && v >= 1; }","tryCatchPattern":"try { await socket.emit(\"editMonitor\", payload); } catch (e) { /* surface e.message */ }","preventionTips":["Sanitize retryInterval in imported/backup data to >=1","Keep retryInterval at or below interval so retries are meaningful"],"tags":["validation","config","interval","retry"],"backgroundTag":null,"analyzedSha":"6b5ea0155793e666666745fb8d6fef1e829543a2","analyzedAt":"2026-08-12T23:42:12.959Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}