mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-20 17:16:39 +00:00
whipsink: Log error body along with status code when POST fails
This commit is contained in:
parent
9180d348bf
commit
03b03fe2dd
1 changed files with 7 additions and 1 deletions
|
@ -684,7 +684,13 @@ impl WhipSink {
|
|||
// FIXME: Check and handle 'Retry-After' header in case of server error
|
||||
Err(gst::error_msg!(
|
||||
gst::ResourceError::Failed,
|
||||
["Server returned error: {}", s.as_str()]
|
||||
[
|
||||
"Server returned error: {} - {}",
|
||||
s.as_str(),
|
||||
self.wait(resp.bytes())
|
||||
.map(|x| x.escape_ascii().to_string())
|
||||
.unwrap_or_else(|_| "(no further details)".to_string())
|
||||
]
|
||||
))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue