-
I've set up a test server opened directly to the internet with a key and cert loaded. As expected, a lot of portscan/botnet traffic finds the servers and sends invalid commands. Occasionally I'm seeing errors I don't know how to handle. In my app I catch errors on next() with a middleware function, and I'm catching errors on app.listen, but they don't seem to be catching something. Am I missing a spot to catch errors, or does this seem like a bug? [uncaught application error]: Http - error writing a body to connection: tls handshake eof
at deno:core/01_core.js:106:46
at unwrapOpResult (deno:core/01_core.js:126:13)
at async HttpConn.nextRequest (deno:ext/http/01_http.js:64:23)
at async serve (https://deno.land/x/oak@v9.0.1/http_server_native.ts:247:34)
[uncaught application error]: Http - error writing a body to connection: received corrupt message
at deno:core/01_core.js:106:46
at unwrapOpResult (deno:core/01_core.js:126:13)
at async HttpConn.nextRequest (deno:ext/http/01_http.js:64:23)
at async serve (https://deno.land/x/oak@v9.0.1/http_server_native.ts:247:34)
[uncaught application error]: Http - error writing a body to connection: tls handshake eof
at deno:core/01_core.js:106:46
at unwrapOpResult (deno:core/01_core.js:126:13)
at async HttpConn.nextRequest (deno:ext/http/01_http.js:64:23)
at async serve (https://deno.land/x/oak@v9.0.1/http_server_native.ts:247:34)
Illegal SNI hostname received [57, 54, 46, 49, 50, 54, 46, 49, 49, 53, 46, 50, 48, 53]
Sending fatal alert DecodeError
[uncaught application error]: Http - error writing a body to connection: tls handshake eof
at deno:core/01_core.js:106:46
at unwrapOpResult (deno:core/01_core.js:126:13)
at async HttpConn.nextRequest (deno:ext/http/01_http.js:64:23)
at async serve (https://deno.land/x/oak@v9.0.1/http_server_native.ts:247:34) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@timpeq these are errors that are happening outside of the processing of the middleware. Instead of swallowing them, oak is surfacing them, because the native HTTP server is surfacing them. As you mention, they are "bad" requests hitting your server, with bots trying to look for exploits. The FAQ - I am seeing In addition, you can set a |
Beta Was this translation helpful? Give feedback.
@timpeq these are errors that are happening outside of the processing of the middleware. Instead of swallowing them, oak is surfacing them, because the native HTTP server is surfacing them. As you mention, they are "bad" requests hitting your server, with bots trying to look for exploits.
The FAQ - I am seeing
[uncaught application error]
in the output, what is going on? covers this.In addition, you can set a
app.addEventListener("error", (evt) => { /* ... */ });
to log or action these types of errors in a more meaningful way (or just ignore certain classes of them).