mirror of
https://github.com/LightZirconite/Microsoft-Rewards-Bot.git
synced 2026-01-10 01:06:17 +00:00
feat: Add warning for unconfigured risk management policies in StartupValidator
This commit is contained in:
@@ -244,14 +244,15 @@ export class StartupValidator {
|
||||
|
||||
// Risk management validation
|
||||
if (config.riskManagement?.enabled === true) {
|
||||
if (config.riskManagement.stopOnCritical === true) {
|
||||
// If risk management is enabled, notify the user to ensure policies are configured.
|
||||
// This avoids an empty-block lint/compile error and provides actionable guidance.
|
||||
this.addWarning(
|
||||
'config',
|
||||
'Risk management will stop execution if critical risk is detected',
|
||||
'Bot will halt all accounts if risk score becomes too high'
|
||||
'riskManagement',
|
||||
'Risk management is enabled but no specific policies were validated here',
|
||||
'Review and configure riskManagement settings (throttles, maxRestarts, detection thresholds)',
|
||||
'docs/config.md'
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// Search delays validation
|
||||
const minDelay = typeof config.searchSettings.searchDelay.min === 'string'
|
||||
|
||||
Reference in New Issue
Block a user