@stephen-shopopop/node-metrics
    Preparing search index...

    Function handleResponseError

    • Handles errors that occur during HTTP response processing.

      This function inspects the provided error and logs information based on its type. If the error is an 'ERR_STREAM_PREMATURE_CLOSE', it logs an informational message indicating that the user aborted the request. For all other errors, it logs the error, ensures a 500 response is sent if headers have not already been sent, writes an error message to the response, and destroys the response with the error.

      Parameters

      • e: unknown

        The error encountered, which can be of any type.

      • outgoing: Readonly<http.ServerResponse>

        The HTTP server response object to send the error response to.

      Returns void