anthony taguest·sydney --:--
← notesnote
validate your environment at the edge
updated Jun 8, 2026
A missing or malformed env var should fail loudly, immediately, and in one place, not as a cryptic 500 three layers deep at 2am. I validate the whole environment against a schema at startup, so bad config is a clear error naming exactly what’s wrong.
One correction since: validate at runtime, not at module load. I had build-time validation crash CI because the build environment legitimately doesn’t have the runtime secrets. The check was right; it ran in the wrong place.
Push correctness checks to the edge, where the error is obvious and local. But be precise about which edge — “as early as possible” can be too early.
the hub · warm terminal