You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the format syntax is invalid, there's nothing we can do. However, if an individual config value is valid, developers might want to handle it in different ways.
The main behavior of DazzleConf is to fail-fast upon reaching the first invalid value. However, it should also be possible to substitute default values and log such substitutions. Moreover, we might benefit from collecting each invalid value, and including them in an exception message or logging about them all at once, so that users don't have to repeatedly reload their configuration and recheck for errors.
We should add an InvalidValueHandler which is allowed to create state per config load, with a cleanup callback after the configuration is finished loading. The default handler should be to fail but to collect all the invalid values first, with a reasonable limit on the number of invalid values to inform the user about in a single error message.
The text was updated successfully, but these errors were encountered:
A248
changed the title
Handle invalid config values individually with cleanup callback
Handle invalid and missing config values individually with cleanup callback
Aug 30, 2023
A248
changed the title
Handle invalid and missing config values individually with cleanup callback
Handle invalid config values individually with cleanup callback
Aug 30, 2023
If the format syntax is invalid, there's nothing we can do. However, if an individual config value is valid, developers might want to handle it in different ways.
The main behavior of DazzleConf is to fail-fast upon reaching the first invalid value. However, it should also be possible to substitute default values and log such substitutions. Moreover, we might benefit from collecting each invalid value, and including them in an exception message or logging about them all at once, so that users don't have to repeatedly reload their configuration and recheck for errors.
We should add an
InvalidValueHandler
which is allowed to create state per config load, with a cleanup callback after the configuration is finished loading. The default handler should be to fail but to collect all the invalid values first, with a reasonable limit on the number of invalid values to inform the user about in a single error message.The text was updated successfully, but these errors were encountered: