When a request fails, httpress currently wraps all transport errors intoError::Http(hyper_error). This means Connection Refused, TLS handshake failure, DNS resolution error all look the same in the output. We should classify errors more specifically so users can diagnose problems faster.
error variants to add:
ConnectionRefused
DnsError
TlsError
ConnectionReset
Timeout
Other(String) - catch-all
And surface these in the CLI summary output (currently only error counts are shown, not types).
Relevant files:
src/error.rs - add new variants here
src/client.rs - classify errors here (look at the execute function)
src/metrics.rs - optionally track error type counts
src/main.rs - print breakdown in CLI output
you might want to take a look at hyper::Error (especially the .source() function)
notes:
- you can open a pr even if only part of the errors are added, but make sure you add the catch all
Other(String)
When a request fails, httpress currently wraps all transport errors into
Error::Http(hyper_error). This means Connection Refused, TLS handshake failure, DNS resolution error all look the same in the output. We should classify errors more specifically so users can diagnose problems faster.error variants to add:
ConnectionRefusedDnsErrorTlsErrorConnectionResetTimeoutOther(String)- catch-allAnd surface these in the CLI summary output (currently only error counts are shown, not types).
Relevant files:
src/error.rs- add new variants heresrc/client.rs- classify errors here (look at theexecutefunction)src/metrics.rs- optionally track error type countssrc/main.rs- print breakdown in CLI outputyou might want to take a look at hyper::Error (especially the .source() function)
notes:
Other(String)