This is a big question and has been debated by Kantians for a long time. Kant says lying is categorically wrong and this is why it gets him into trouble with scholars. According to a Kantian example, if someone knocks on your door and wants to know where your friend is so he can kill him, you must tell the truth. He was an absolutist - or is interpreted that way. But Kant also says men must lie sometimes, and this is the Original Sin. We violate strict rules of reason for empirical needs to stay alive, etc.
I don’t agree with this, but I also find that people who jump on Kant for this may not fully understand him. I’ve been thinking about this one as well, and have not fully considered his argument in the context of the rest of his philosophy. But the Kantian project is not quite complete, there are bits that need to be filled in that scholars haven’t yet.