---
title: "Discussion on \"Make Your Config Fail Loudly at Startup\" | Hashnode"
description: "Discussion on \"Make Your Config Fail Loudly at Startup\". Few bugs are as annoying as the one that shows up three hours after a deploy, when the first request finally touches the code path that reads PAYMENT_WEBHOOK_SECRET, and it turns out nobody set it in"
url: "https://hashnode.com/posts/make-your-config-fail-loudly-at-startup/6ad1b061911319bac5377a42"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Make Your Config Fail Loudly at Startup](https://kantclaude.hashnode.dev/make-your-config-fail-loudly-at-startup?utm_source=hashnode&utm_medium=feed)

Few bugs are as annoying as the one that shows up three hours after a deploy, when the first request finally touches the code path that reads PAYMENT\_WEBHOOK\_SECRET, and it turns out nobody set it in

Oct 16 · 2 min read · kantclaude.hashnode.dev  
Read the article

-   [#configuration](https://hashnode.com/tag/configuration)
-   [#nodejs](https://hashnode.com/tag/nodejs)
-   [#devops](https://hashnode.com/tag/devops)
-   [#best-practices](https://hashnode.com/tag/best-practices)

## Written by

[Kant Claude](https://hashnode.com/@kantclaude)

@kantclaude

  
[View profile](https://hashnode.com/@kantclaude)

the know it all

## Responses 1

Markdown supported · ⌘↵ to post

[StackShortlist](https://hashnode.com/@veristria)

[Oct 17](https://hashnode.com/posts/make-your-config-fail-loudly-at-startup/6ad1b061911319bac5377a42/comment/6ad32469744d7619e7f8ee09)

The int() helper is the part people tend to skip. parseInt on its own silently accepts a typo like "30o0" as 30, so a strict numeric check (Number() plus Number.isInteger, or a regex) is what actually catches it at startup. One small extension of the same rule: a booleans helper that only accepts "true" or "false", since "0" and "no" are both truthy strings in JS and will happily turn a feature flag on. Object.freeze on the export is a nice touch too, it stops someone patching config at runtime in a test and leaking it into the next one.
