Questions tagged [retry-logic]

Programming techniques designed to retry operations that failed due to error codes, exceptions, or other language specific means.

377 questions
-1
votes
1 answer

Retry pattern swallows the exceptions in a Task.Run

I've got two Transient Fault Handling/Retry pattern implementations. The issue is that theTask.Run swallows the exception and it doesn't rethrow it out of the Task.Run scope. If I await the Task.Run it would work, but I cannot do that in my real use…
nop
  • 4,711
  • 6
  • 32
  • 93
-1
votes
1 answer

Anonymous lambda function does not return to caller

I have the following code that is supposed to call the ExecuteAsync function from Polly. However, after return objectResponse_.Object; the call does not return to calling function and basically gets lost (events show thread has exited with code 0).…
AIK DO
  • 288
  • 1
  • 4
  • 13
-1
votes
1 answer

C# How to polly the GetStreamAsync api call

I have the following code to call the bank api, and convert the response into the object. public static async Task LoadExchange(string currency, string date) { string url = "here is the bank's api url"; var streamTask = await…
Palamar66
  • 212
  • 1
  • 9
-1
votes
1 answer

How to apply Polly retry for async POST with custom headers?

I'm using a policy to retry a call in case it fails due to certain reason. AsyncRetryPolicy GetPolicy() => Policy .HandleResult(a => a.StatusCode is HttpStatusCode.Poof or ...) …
Konrad Viltersten
  • 36,151
  • 76
  • 250
  • 438
-1
votes
1 answer

how to write python concurrent future and retry correctly? Tableau API

I am a newbie to concurrent. I am trying to refresh 3 workbooks in Tableau: workbook_dict = {"workbook1":"workbook_id1","workbook2":"workbook_id2","workbook3":"workbook_id3"} @retry(tries=3, delay=5, backoff=0.2) def…
Sailormoon
  • 259
  • 1
  • 5
  • 23
-1
votes
1 answer

Retry with Polly ending in System.InvalidOperation The request message was already sent, cannot send the same request message multiple times

I'm sending data to a databricks api with a bad bearer token to test a Polly retry policy, but I get this exception: InvalidOperation exception: The request message was already sent. Cannot send the same request message multiple…
-1
votes
1 answer

Polly - Policy Handler which evaluates transient failures from HTTP response content

I'm using Refit, with Polly and Polly.Extensions.Http in an ASP.NET Core Web API to call some external APIs. I'm trying to add a policy handler using Polly which can retry depending on the body content as the external API I am working with, doesn't…
xceled
  • 1
  • 1
-1
votes
2 answers

Can we configure retry attempts on AWS Go SDK service calls

AWS by default provides retries support on its service calls, which is usually set to a max of 3 attempts. Can we configure the retry object to set retry attempts to 5?
Riya John
  • 474
  • 4
  • 14
-1
votes
1 answer

how to re-try request for 401 along with TransientHttpError ( 5XX and 408)

Below code re-try 2 times when we have error from HttpRequestException, 5XX and 408 and it's works fine. Here I want to re-try for even 401 error? how we can achieve this with Polly? services.AddHttpClient(Options.DefaultName) …
user584018
  • 10,186
  • 15
  • 74
  • 160
-1
votes
1 answer

Selenium: How do I retry browser/URL when ValueError("No tables found")

I have a code that scrapes oddsportal website. Sometimes while scraping, I get ValueError("No tables found") and when I manually refresh browser, page loads. How do I do it via code? My code is as below: import pandas as pd from selenium import…
user16304089
-1
votes
1 answer

Polly Common interface for IAsync policies

is anyone able to tell me why this is not working? I am attempting to make a generic Interface to define a Polly RetryPolicy and CircuitBreaker policy in c# but am getting a compilation error: CS0029: Cannot Implicitly Convert Type…
-1
votes
1 answer

polly retry policy within given period of time

I have the following code: var expirationPeriodMilliseconds = 1000; return Policy .HandleResult(message => message.Status == EnquiryStatus.SystemError) .RetryForeverAsync() // instead run until expirationPeriodMilliseconds …
Andrei
  • 119
  • 1
  • 1
  • 10
-1
votes
1 answer

Quarz retry / misfire

I have an understanding problem concerning Quartz: if an exception occurs in execute (...) of the job - does that count as misfire or do i have to worry about a retry myself in this case? Or in other words: I want to have a (simple) trigger for only…
JFu
  • 1
-1
votes
2 answers

Specify Giveup/Failure Action

I am using Polly to make HTTP requests and retry 5 attempts if the request fails. Is it possible to specify an action when 5 attempts have failed and the policy gives up? In the below code; when we have failed 5 times I know the user doesn't have…
sazr
  • 24,984
  • 66
  • 194
  • 362
-2
votes
1 answer

Is there a way to implement a retry function when an error occurs when uploading files to a certain drive?

I am working on a project in charge of uploading the files everyday from a database to a drive in OneDrive. It happens that for a strange reason when you have uploaded half the files it suddenly fails. I wanted to know if there's a way to implement…
1 2 3
25
26