KDE does not mount external hard disk with an encrypted partition

I have been using an external hard disk with an encrypted partition.

Earlier, it would mount the partition at /run/media/user/encrypted-partition.

Now when I connect the hard disk, it asks for password, etc. but fails to mount the partition.

I am able to mount the partition using command line tools as discussed here.

How do I get KDE to mount encrypted partitions?

P.S. I am able to mount unencrypted partitions without any difficulty in KDE.