Skip to content

status prints a spurious '[ERROR] rigforge aborted' to stderr when the worker API is unreachable (exit code is still 0) #364

Description

@VijitSingh97

Found while working #353 (not a regression from it — reproduces on origin/develop before and after that branch).

rigforge.sh status (and likely tune/autotune, which reach the API through the same propagate-mode reader) prints a duplicate [ERROR] rigforge aborted while running '...' line to stderr when the worker API is genuinely unreachable — even though the command completes correctly, prints its proper fallback message, and exits 0.

Why it matters: the ERR-trap line is the signal operators are taught to treat as "something broke". Emitting it on a handled, exit-0 path trains people to ignore it — and it is exactly the noise that made #341's real abort easy to miss.

Repro: stop the miner (or point api_port at a closed port) and run sudo ./rigforge.sh status; observe the correct "API unreachable" fallback output, exit 0, and the stray [ERROR] rigforge aborted ... on stderr.

Likely shape: a guarded call whose failure still trips the ERR trap because the guard is outside the $(...), or a trap firing on the subshell — the repo's existing "guarded-inside-$()" idiom (#210) is the pattern to apply.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions