Customize deserializer in plugins so can use InvalidConfigValue
when serde_json parsing fails.
#944
Labels
product: plugin
Relates to one or more hipcheck-maintained plugins
type: chore
Clean up or management task.
Milestone
Right now, in some plugins we have a
#[derive(Deserialize)]
on astruct Config
to auto-parse JSON-value fromset_config()
into a struct. However, this doesn't give us information as to what field caused a failure if one occurs. Update the code to returnInvalidConfigValue
where appropriate. You can test this by changing the type of anint
config value in a policy file to a float.The text was updated successfully, but these errors were encountered: