Skip to content

Commit 8f926a0

Browse files
committed
fix(http2): send INTERNAL_ERROR when user's Service errors
1 parent 3a6080b commit 8f926a0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/proto/h2/server.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,12 @@ where
209209
}
210210
return Ok(Async::NotReady);
211211
}
212-
Err(e) => return Err(::Error::new_user_service(e)),
212+
Err(e) => {
213+
let err = ::Error::new_user_service(e);
214+
warn!("http2 service errored: {}", err);
215+
self.reply.send_reset(Reason::INTERNAL_ERROR);
216+
return Err(err);
217+
},
213218
};
214219

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

0 commit comments

Comments
 (0)