elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.69k stars 8.24k forks source link

[Config Service] Human-friendly error message when config has `enabled` flag but it's not in the schema #202490

Open afharo opened 2 hours ago

afharo commented 2 hours ago

As part of https://github.com/elastic/kibana/pull/201579, we added some special code to handle the case where enabled is provided in the config but it's not available in the schema.

Since that's a specific piece of code, we can now control the error message. Should we work out a more human-friendly error message or are we happy with the current joi-generated error message:

[config validation of [myPlugin].enabled]: definition for this key is missing

With that new piece of logic, we could change that message to something like:

"myPlugin"'s enabled status cannot be changed. Please, remove "myPlugin.enabled" from the configuration file.

elasticmachine commented 2 hours ago

Pinging @elastic/kibana-core (Team:Core)