-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: aborted, code: 'ECONNRESET' #207
Comments
Hi @beeequeue, Thanks for the report.
Since it is captured as an error on hono, we can handle it with onError. app.onError((err, c) => {
console.error(err)
return c.text('Internal Server Error', 500)
}) |
We are still getting these uncaught errors after adding this to our application: app.onError((error, c) => {
if ("status" in error) {
const statusCode = error.status ?? 500
return c.json(
{
error: true,
status: statusCode,
message: error.message,
},
statusCode,
)
}
logger.error({ error }, "Unhandled error")
return c.json({ error: true, status: 500, message: "Internal Server Error" }, 500)
}) |
I wish I could provide more to help like a reproduction but I have tried so many things and have never been able to create an |
I have not been able to work around this issue I have added
and not a single one have been called once despite the entire server crashing with the We have had to resort to using |
Hi all (I'm new here 😄) This is one way to reproduce the connection reset errors locally (resets connection after 1 second):
What you want to do in order to catch this server level error is to add the handler to the server object itself. I don't see where this event is linked to Hono's |
While it creates a We have also contacted AWS support about this, as we discovered all our services started encountering this issue on the same day (Oct 16th) and 2 of them are still using Koa instead of Hono. |
We're seeing a bunch of errors that seem to be happening because the socket on
IncomingMessage
is closing, and I have no idea where it could be coming from except this libraryIs there some check that should be added somewhere either in this library or outside it to handle these errors?
I found #107 but that was a while ago and we're still seeing it on the latest version
I have not managed to reproduce these errors once locally which makes it pretty much impossible to debug 😢
Screenshot of all our logs say (bottom-to-top)
The text was updated successfully, but these errors were encountered: