Include the name of the failing key when configuration loading fails
Configuring a configuration value with for example an incorrect type produces an error message that doesn't specify which key is the problem. This makes it difficult to identify option in the configuration is the issue. For example, configuring a database port as a string
instead of an int
gives the following error with no mention of the key: praefect: configuration error: error reading config file: toml: cannot store TOML string into a Go int
. We should include the problematic key in the error so the user can identify the problem.