bug: Throwing Error in syncEnvVars does not stop deployment #1641
Description
Provide environment information
System:
OS: macOS 14.6.1
CPU: (8) arm64 Apple M1
Memory: 210.30 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.1.0 - ~/.nvm/versions/node/v20.1.0/bin/node
Yarn: 1.18.0 - /usr/local/bin/yarn
npm: 9.6.4 - ~/.nvm/versions/node/v20.1.0/bin/npm
pnpm: 9.10.0 - ~/.nvm/versions/node/v20.1.0/bin/pnpm
bun: 1.0.1 - ~/.bun/bin/bun
Describe the bug
I've encountered an unexpected behavior with error handling in the syncEnvVars callback:
Current behavior:
We throw an error when required env vars are missing
The error appears as a warning message
Deployment continues despite the error
Expected behavior:
Deployment should stop when the error is thrown
Reproduction repo
https://trigger.dev/docs/deploy-environment-variables#the-syncenvvars-callback-return-type
To reproduce
Just throwing any kind of error in the syncEnvVars callback