Skip to content

Webhook dispatcher should not import-crash on malformed numeric env #7325

@yyswhsccc

Description

@yyswhsccc

Summary

tools/webhooks/webhook_server.py parses WEBHOOK_POLL_INTERVAL and LARGE_TX_THRESHOLD with module-level numeric casts.

Malformed values can crash the webhook dispatcher during import before CLI args, defaults, or admin routes can be used.

Impact

A simple webhook configuration typo such as WEBHOOK_POLL_INTERVAL=fast or LARGE_TX_THRESHOLD=huge can prevent the dispatcher from loading. The tool already has safe defaults, so malformed numeric env values should fall back instead of import-crashing.

Expected

Missing, empty, or malformed numeric environment values should fall back to existing defaults without changing valid configuration behavior.

Scope

Small webhook-tool config hardening only. No node, wallet, transfer, reward, payout, admin-key, or production behavior changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions