Skip to main content

body_read_error_message

Function body_read_error_message 

Source
pub fn body_read_error_message<E: Display>(err: E) -> String
Expand description

Format an HTTP body-read failure as a descriptive placeholder string.

Used by body_of / body_of_blocking to mirror upstream GoReleaser’s internal/client/github.go::bodyOf (commit 8b77358): a transport-level read error becomes "could not read response body: <err>" rather than silently truncating to "". Exposed as a free function so unit tests can pin the exact wording without standing up a fault-injecting HTTP server.