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
When the Setting::Loader is unable to determine the value of a particular setting it silently fails (does not raise an InvalidSettingsError). The setting value is only evaluated at runtime when some downstream component attempts to access it, and the exception raise is a Dry::Types::ConstraintError which makes no reference to the name of the offending/missing setting making it very hard to debug.
To Reproduce
Declare a settings provider that inherits from the settings provider source:
I get an InvalidSettingsError when the settings are loaded. Something like:
Could not load settings. The following settings were invalid: (Dry::System::ProviderSources::Settings::InvalidSettingsError)
db_host: nil violates constraints (type?(String, nil) AND filled?(nil) failed)
My environment
Affects my production application: Not yet
Ruby version: reproduced on 2.7.5 and 3.1.2
OS: macOS
The text was updated successfully, but these errors were encountered:
Describe the bug
When the Setting::Loader is unable to determine the value of a particular setting it silently fails (does not raise an
InvalidSettingsError
). The setting value is only evaluated at runtime when some downstream component attempts to access it, and the exception raise is aDry::Types::ConstraintError
which makes no reference to the name of the offending/missing setting making it very hard to debug.To Reproduce
Declare a settings provider that inherits from the settings provider source:
Then don't set a
DB_HOST
var in the environment.Expected behavior
I get an
InvalidSettingsError
when the settings are loaded. Something like:My environment
The text was updated successfully, but these errors were encountered: