How to find out if LND opening pending channels has a confirmation onchain? After typing lncli pendingchannels I get a channel_point number, and when I put channel_point txid to check if it was confirmed onchain 
by typing:

bitcoin-cli gettransaction "txid insert"


I get an error:

error code: -5
error message:
Ivalid or non-wallet transaction id


How can I  see if whoever opened (pending state) channel to me has a confirmation on chain?
lncli pendingchannels gives a pendingChannelRespnse which might have the pending_open_channels parameter. This contains an array of  PendingOpenChannel objects. 

According to the documentation they should have a parameter confirmation_height which is the height of the blockchain at which the funding TX has enough confirmations (the max of your and your channel partners threshold) 

See 


So from bitcoin-cli you figure out the current height and take the difference to see how many confirmations are still needed. 

I guess if you don't get a pendingopenchannel object you don't have confirmations yet.