Skip to content

Commit

Permalink
fix: Actix stream error handling with 0.8 error types (#3574)
Browse files Browse the repository at this point in the history
  • Loading branch information
gbj authored Feb 10, 2025
1 parent 299acd2 commit c2289b2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server_fn/src/request/actix.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use crate::{
error::{FromServerFnError, IntoAppError, ServerFnErrorErr},
request::Req,
ServerFnError,
};
use actix_web::{web::Payload, HttpRequest};
use bytes::Bytes;
Expand Down Expand Up @@ -92,7 +91,10 @@ where
) -> Result<impl Stream<Item = Result<Bytes, E>> + Send, E> {
let payload = self.0.take().1;
let stream = payload.map(|res| {
res.map_err(|e| ServerFnError::Deserialization(e.to_string()))
res.map_err(|e| {
ServerFnErrorErr::Deserialization(e.to_string())
.into_app_error()
})
});
Ok(SendWrapper::new(stream))
}
Expand Down

0 comments on commit c2289b2

Please sign in to comment.