Skip to content

Commit 6c46c19

Browse files
authored
Merge pull request #28 from ProjectLighthouseCAU/fix-stream-error-handling
Fix stream error handling
2 parents a401d2c + 91f7d08 commit 6c46c19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lighthouse-client/src/lighthouse.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ impl<S> Lighthouse<S>
244244
let path: Vec<String> = path.into_iter().map(|s| s.as_ref().to_string()).collect();
245245
self.send_request(request_id, &Verb::Stream, &path, payload).await?;
246246
let stream = self.receive_streaming(request_id).await?;
247-
Ok(stream.guard({
247+
Ok(stream.map(|m| Ok(m?.check()?.decode_payload()?)).guard({
248248
// Stop the stream on drop
249249
let this = (*self).clone();
250250
move || {

0 commit comments

Comments
 (0)