electrode-confippet icon indicating copy to clipboard operation
electrode-confippet copied to clipboard

fail vs warn

Open wmertens opened this issue 8 years ago • 2 comments

Currently, you can only throw on failure, but you can't get a warning instead. failMissing and warnMissing work on different provider types.

Is this intentional? I would like to remind my users to create a config file for the current environment, not crash the app…

wmertens avatar Mar 03 '17 10:03 wmertens

every provider supports the same set of functionalities. You can set a provider type to required, disabled, optional, or warn.

see doc here: https://github.com/electrode-io/electrode-confippet/blob/master/compose.md#confippetcomposeconfig

If you want a warning if the file for a provider is missing, you can set its type to warn.

jchip avatar Jun 07 '17 05:06 jchip

As a user, it's surprising to me that providers have only a single behavior like this. It requires you to know exactly what the providers are named and how their data structure is if you want to change their type…

wmertens avatar Jun 07 '17 20:06 wmertens