My backend code got the error below while trying to respond to the client request.
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client