diff --git a/lib/core/request.js b/lib/core/request.js index 7db05ce65ae..fbbe45a6d9c 100644 --- a/lib/core/request.js +++ b/lib/core/request.js @@ -229,11 +229,7 @@ class Request { onBodySent (chunk) { if (this[kHandler].onBodySent) { - try { - this[kHandler].onBodySent(chunk) - } catch (err) { - this.onError(err) - } + return this[kHandler].onBodySent(chunk) } } @@ -243,11 +239,7 @@ class Request { } if (this[kHandler].onRequestSent) { - try { - this[kHandler].onRequestSent() - } catch (err) { - this.onError(err) - } + return this[kHandler].onRequestSent() } }