Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent sending response headers if already sent in default error han… (
#2006) * Prevent sending response headers if already sent in default error handler This change addresses a bug where the defaultProcessEventErrorHandler could attempt to send HTTP response headers after they've already been sent, leading to a server error. The fix adds a check for the response.headersSent property before attempting to write headers or end the response. The update ensures that the error handler behaves correctly even if ack() has been called previously during request processing. * Update log messages as per code review feedback
- Loading branch information