SailajaB
Databricks Partner

Here is the sample code

if not any(mount.mountPoint == "/test/" for mount in dbutils.fs.mounts()):

 dbutils.fs.mount(source = "***",

            mount_point = "/test/",

           extra_configs = configs)

else:

 logger.error("Directory is already mounted")

Note : Mount path is already existed.. If I run this notebook through ADF pipeline, I am expecting that pipeline should fails but it is not getting failed.