Skip to content

Commit

Permalink
fix(http2): send INTERNAL_ERROR when user's Service errors
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Mar 1, 2019
1 parent 3a6080b commit 8f926a0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/proto/h2/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,12 @@ where
}
return Ok(Async::NotReady);
}
Err(e) => return Err(::Error::new_user_service(e)),
Err(e) => {
let err = ::Error::new_user_service(e);
warn!("http2 service errored: {}", err);
self.reply.send_reset(Reason::INTERNAL_ERROR);
return Err(err);
},
};

let (head, mut body) = res.into_parts();
Expand Down

0 comments on commit 8f926a0

Please sign in to comment.