I'm not seeing why you want `OptionValue` rather than just putting the call to `get_env` into the case. For example, where you log the error, showing the value rather than `{ok, Value}` would probably be better.