Skip to content

Node fails to exit gracefully when required environment variables are missing #826

@headway-mordant

Description

@headway-mordant

Description

When running base/node, the process does not exit immediately if required environment variables are missing or misconfigured. Instead, the node continues to run, which can lead to runtime errors later, making it harder to diagnose the issue.

Problem Description

When critical environment variables are absent or invalid:

  • The node does not fail fast, and initialization continues.
  • Errors occur later during runtime, often deep in the application lifecycle, leading to difficult-to-trace failures.
  • Developers must manually inspect logs or the configuration to identify the missing variables.

Expected Behavior

If required environment variables are missing or misconfigured, the node should fail early during startup with a clear error message indicating which variable is missing or invalid. This would allow developers to fix configuration issues before any actions are taken.

Proposed Solution

Add validation during the startup process to check for all required environment variables. If any are missing or incorrectly configured, the process should exit immediately with an informative error message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions