@Shweta This caught by the Azure Functions Runtime which triggers the retry. The docs do mention that uncaught exceptions would trigger a retry. To quote the retry policies doc,
A retry policy is evaluated whenever an execution results in an uncaught exception. As a best practice, you should catch all exceptions in your code and rethrow any errors that should result in a retry.