Hi Rohan,
Hope you are doing well.
You need to handle DatabaseException and send Feedback
_Message (with Message Text like "Duplicate data" and Message Type = Entities.MessageType.Error) in the save screen action (or any other screen action that you are using to save those data in the database).
Request you to please check the attached screenshot and hope it will help you.
Many Thanks,
SKG