adonisjs / env

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

fix: report all validations failed at once #23

Closed Xstoudi closed 3 years ago

Xstoudi commented 4 years ago

Proposed changes

See #20

Types of changes

Checklist

thetutlage commented 4 years ago

The issue here is that the exception codes are not useful anymore. We are just concatenating the messages and displaying them.

I am not sure what is the right answer to this problem. But exception codes are something I want to keep, as they will be documented on the website

Xstoudi commented 4 years ago

Were they useful before? This part run before http server starts.

Alternatively, I could collect both error types (missing and invalid) as separate arrays. It won't be optimal for the user, but having to start the server two times instead of N is still an improvement.

What do you think?

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 feedback