mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-01 23:08:42 +00:00
net/webrtc-http: whipsink: Return a proper error message & not panic
On a server error, we currently crash and panic. Return a proper error message instead. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/914>
This commit is contained in:
parent
8011eadfd2
commit
c63307e6d7
1 changed files with 4 additions and 1 deletions
|
@ -682,7 +682,10 @@ impl WhipSink {
|
|||
|
||||
s if s.is_server_error() => {
|
||||
// FIXME: Check and handle 'Retry-After' header in case of server error
|
||||
todo!()
|
||||
Err(gst::error_msg!(
|
||||
gst::ResourceError::Failed,
|
||||
["Server returned error: {}", s.as_str()]
|
||||
))
|
||||
}
|
||||
|
||||
s => Err(gst::error_msg!(
|
||||
|
|
Loading…
Reference in a new issue