Problem
Running with no assertion flags produces a network-failure-flavoured error and the network-failure exit code, even though the condition is detected before any request is attempted.
Reproduction
$ http-assert http://127.0.0.1:8791/ok
Error: Cannot perform request: no assertions defined
[exit=93]
Also reachable via --assert-body-empty=false, which parses to zero assertions.
Why it matters
This is a usage error. Reporting it as 93 means a CI job cannot distinguish "I forgot a flag" from "the endpoint is unreachable".
Suggested fix
Validate in parseAssertionFlags / the cobra Run before constructing the request, exit with the invalid-arguments code, and point at a remedy:
Error: no assertions specified; pass at least one --assert-* flag (e.g. --assert-ok)
Problem
Running with no assertion flags produces a network-failure-flavoured error and the network-failure exit code, even though the condition is detected before any request is attempted.
Reproduction
Also reachable via
--assert-body-empty=false, which parses to zero assertions.Why it matters
This is a usage error. Reporting it as
93means a CI job cannot distinguish "I forgot a flag" from "the endpoint is unreachable".Suggested fix
Validate in
parseAssertionFlags/ the cobraRunbefore constructing the request, exit with the invalid-arguments code, and point at a remedy: