Skip to content

Humanize HTTP errors and adjust tests#32

Merged
venelinkochev merged 1 commit into
mainfrom
update/probe-errors
Apr 16, 2026
Merged

Humanize HTTP errors and adjust tests#32
venelinkochev merged 1 commit into
mainfrom
update/probe-errors

Conversation

@venelinkochev
Copy link
Copy Markdown
Contributor

Add human-readable HTTP error classification to improve monitor output: introduce humanizeHTTPError, formatDuration and trimAfter helpers; map common cases (timeout, DNS failures, TLS issues, connection errors, redirect loops) to short messages and unwrap url.Error. Update HTTPChecker to use the new formatter and normalize status text to "HTTP ". Adjust tests to expect the new messages and add cases for DNS not found and connection refused.

Add human-readable HTTP error classification to improve monitor output: introduce humanizeHTTPError, formatDuration and trimAfter helpers; map common cases (timeout, DNS failures, TLS issues, connection errors, redirect loops) to short messages and unwrap url.Error. Update HTTPChecker to use the new formatter and normalize status text to "HTTP <code> <text>". Adjust tests to expect the new messages and add cases for DNS not found and connection refused.
@venelinkochev venelinkochev merged commit 42c4494 into main Apr 16, 2026
2 checks passed
@venelinkochev venelinkochev deleted the update/probe-errors branch April 16, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant