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
I need someone to please explain why I need "message" and "stack" here:
import{cleanEnv,makeValidator,str,testOnly}from'envalid';importloggerfrom'../utils/logger-winston';constenv=cleanEnv(process.env,{MONDAY_API_KEY: str({devDefault: testOnly('')}),NODE_ENV: str({choices: ['development','production','test']}),message: str(),stack: str(),},{reporter: (data)=>{logger.info(`There are errors in the environment variables:`,{ data });},},);exportdefaultenv;
without these vars
2023-12-14 17:46:04 [info]: There are errors in the environment variables:
{
"data": {
"errors": {},
"env": {
"MONDAY_API_KEY": "***",
"NODE_ENV": "test"
}
},
"level": "info",
"message": "There are errors in the environment variables:",
"timestamp": "2023-12-14 17:46:04"
}
with said vars:
2023-12-14 17:48:31 [info]: There are errors in the environment variables:
{
"data": {
"errors": {
"message": {
"name": "EnvMissingError"
},
"stack": {
"name": "EnvMissingError"
}
},
"env": {
"MONDAY_API_KEY": "***",
"NODE_ENV": "test"
}
},
"level": "info",
"message": "There are errors in the environment variables:",
"timestamp": "2023-12-14 17:48:31"
}
The text was updated successfully, but these errors were encountered:
I need someone to please explain why I need "message" and "stack" here:
without these vars
with said vars:
The text was updated successfully, but these errors were encountered: