The phishing detector currently fails to update when any one of the provided configurations is invalid, causing all configurations to be rejected. This results in the detector missing important updates due to a single faulty configuration.
To address this, the configuration validation process has been improved. We now filter out invalid configurations using the validateConfig function and allow valid configurations to proceed without blocking the entire process. This change ensures that invalid configurations no longer prevent updates and are logged for visibility, allowing the detector to stay up-to-date with valid configurations.
References
Changelog
@metamask/phishing-controller
CHANGED: processConfigs function to filter and validate phishing detector configurations, discarding invalid ones.
CHANGED: Invalid configurations are logged via console.error instead of causing the entire process to fail.
Checklist
[x] I've updated the test suite for new or updated code as appropriate
[x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
[x] I've highlighted breaking changes using the "BREAKING" category above as appropriate
[x] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes
Explanation
The phishing detector currently fails to update when any one of the provided configurations is invalid, causing all configurations to be rejected. This results in the detector missing important updates due to a single faulty configuration.
To address this, the configuration validation process has been improved. We now filter out invalid configurations using the validateConfig function and allow valid configurations to proceed without blocking the entire process. This change ensures that invalid configurations no longer prevent updates and are logged for visibility, allowing the detector to stay up-to-date with valid configurations.
References
Changelog
@metamask/phishing-controller
processConfigs
function to filter and validate phishing detector configurations, discarding invalid ones.console.error
instead of causing the entire process to fail.Checklist