Skip to content

Conversation

@rasulov-emirlan
Copy link

Before we would return error right aways. Now when we encounter an error on parsing stage, we try to list all the missing or incorrect envs. This should make debugging for our users easier. Seeing all the missing and incorrect envs, will help us fix configs faster. Also added some tests for the new error type.

Here is an example of what error message might look like:

missing required environment variables: 
	"PORT"
	"JWT_SALT"
	"READ_TIMEOUT"
parsing errors for environment variables: 
	field WriteTimeout env "WRITE_TIMEOUT": time: invalid duration "incorrect"

We might even make the error type public in the future. So our users will have an ability to choose how the want to represent these errors.

PS: thank you for this amazing package

Before we would return error right aways. Now when we encounter an error on parsing stage, we try to list all the missing or incorrect envs. This should make debugging for our users easier
Also added some tests for the new error type.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant