adonisjs / env

Framework agnostic environment variables parser and validator
https://docs.adonisjs.com/guides/environment-variables
MIT License
37 stars 10 forks source link

Report all environment failed validations at once #20

Closed targos closed 3 years ago

targos commented 4 years ago

Currently, if multiple environment variables fail the validation, only the first one is reported. Then, after fixing it, one has to restart the server and be notified of the next failed validation, etc.

I think it would be more user-friendly to collect and report all env validation errors at once.

thetutlage commented 4 years ago

Cool. We can collect all and report them together. I am happy to accept the PR 🙂

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

targos commented 3 years ago

Waiting for https://github.com/adonisjs/env/pull/23

thetutlage commented 3 years ago

I am still not 100% sure on best to display multiple exceptions together. If we raise one exception and concatenate the error messages, then we will not be able to leverage error codes properly since different errors have different error codes

thetutlage commented 3 years ago

Closing, until a good idea strikes to merge all errors together