Hello Singh, Preeti,
Thanks for reaching out!
The errors "gatewayTimeoutUncategorized" defines service wasn’t able to complete the request within the time limit.
You can refer below screenshots.
For handling the errors like "gatewayTimeoutUncategorized" which is fall under second-level error codes, please refer the link.
JSON batching allows you to optimize your application by combining multiple requests (up to 20) into a single JSON object. Please refer the below screenshot of batch request for excel API.
POST https://graph.microsoft.com/v1.0/$batch
Please refer the below link for Json Batching.
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.