Quantcast
Channel: Active questions tagged retry-logic - Stack Overflow
Viewing all articles
Browse latest Browse all 950

Creating Polly retry policy creation for HTTP Transient exception

$
0
0

I am trying to implement Polly retry for a method for HTTP transient exception but I am stuck.

CustomResponse response = getResponse(CustomRequest request)

getResponse has 2 implementations one using WCF another using API. These two implementation are in separate class.

If succeed I will get a response of my output type CustomResponseOr it will throw exception such as serviceNotAvailable or Internal server error

I tried writing this below policy

Policy.handle<httpRequestException>()    .Or<TimeOutexception()    .Or<BadRequestException>()

But I am not able to get one for service not available and internal server error


Viewing all articles
Browse latest Browse all 950

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>