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
{{ message }}
Repository navigation
Feature Request: surface errors instead of warnings/swallowing #372
In some cases, one might want to reject entirely an environment file that is un-parsable (e.g., to avoid unintended side-effects from a partial configuration or dotenvs internal attempts to make sense of things).
Is it possible to surface errors to a caller (e.g., a creator of DotEnv) somehow? I'm thinking of something like:
I just run into a similar issue. If using this as a library then having error raised is essential in some cases. Personally, this could also be addressed by changing logging.warning calls to warning.warn calls, those could be caught (with a little bit of additional efforts) as well. Happy to work on this (raising Errors or warnings) if the developers here agree that this would be a welcome change.
Activity
cosama commentedon May 6, 2022
I just run into a similar issue. If using this as a library then having error raised is essential in some cases. Personally, this could also be addressed by changing
logging.warningcalls towarning.warncalls, those could be caught (with a little bit of additional efforts) as well. Happy to work on this (raising Errors or warnings) if the developers here agree that this would be a welcome change.theskumar commentedon Jun 5, 2022
Related/Duplicate: