Hello @Ankush Gurjar ,
welcome to this moderated Azure community forum.
Based on the 'System.NullReferenceException' exception, the code in your function tried to read a variable, sub variable, or parameter that was instantiated.
You need to debug your code to see where the call was made.
If you use Azure Application Insights, you can probably drill down to the trace log with more details.
It's also recommended to use a try-catch block so you can catch errors loke this for a more graceful flow.
If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.