HCLTech interview question

Exception handling explanation How do you connect api code to database