Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcException on Rety

Rachit Gaur 1 Reputation point
2021-10-04T05:37:13.817+00:00

I have created one azure function using Node and I have implemented retry in that. To achieve this I am not handling the exception in catch and throwing the exception. In that case retry is working but its giving RpcException (Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcException). May I know what wrong I am doing or how can I handle this exception in retry flow?

host.json
"retry": {
"strategy": "exponentialBackoff",
"maxRetryCount": 3,
"minimumInterval": "00:00:10",
"maximumInterval": "00:01:00"
}

handling error
catch (error) {
const { retryContext } = context.executionContext;
if(retryContext.retryCount >= retryContext.maxRetryCount){
return handleErrorResponse(context, error)
}
throw error;
}

if the retry count is less then maxRetryCount (3 in my case). its going for retry but giving exception as well.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,322 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Mike Urnun 9,756 Reputation points Microsoft Employee
    2021-10-22T01:56:16.477+00:00

    Hello @Rachit Gaur - Apologies for the late response. RpcException is quite a generic error and I believe there may be an underlying issue:

    0 comments No comments