Skip to content

Commit e896a4f

Browse files
authored
Dont log DISCONNECTED application errors (#3650)
* Dont log DISCONNECTED application errors
1 parent c6044de commit e896a4f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/workerd/server/server.c++

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,6 +1289,10 @@ class Server::InspectorService final: public kj::HttpService, public kj::HttpSer
12891289

12901290
kj::Promise<void> handleApplicationError(
12911291
kj::Exception exception, kj::Maybe<kj::HttpService::Response&> response) override {
1292+
if (exception.getType() == kj::Exception::Type::DISCONNECTED) {
1293+
// Don't send a response, just close connection.
1294+
co_return;
1295+
}
12921296
KJ_LOG(ERROR, kj::str("Uncaught exception: ", exception));
12931297
KJ_IF_SOME(r, response) {
12941298
co_return co_await r.sendError(500, "Internal Server Error", headerTable);

0 commit comments

Comments
 (0)