Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
vivekjvs
Frequent Visitor

what is the default amount of retries for value.waitfor

Hi

 

In the below mentioned code snippet, the number of retries is 5 in case of 500 response code of the HTTP call.
https://learn.microsoft.com/en-us/power-query/wait-retry

 

let
    waitForResult = Value.WaitFor(
        (iteration) =>
            let
                result = Web.Contents(url, [ManualStatusHandling = {500}, IsRetry = iteration > 0]),
                status = Value.Metadata(result)[Response.Status],
                actualResult = if status = 500 then null else result
            in
                actualResult,
        (iteration) => #duration(0, 0, 0, Number.Power(2, iteration)),
        5)
in
    if waitForResult = null then
        error "Value.WaitFor() Failed after multiple retry attempts"
    else
        waitForResult

 


Can someone please tell me what is the default number of retries if no count is specified. 


1 REPLY 1
AnalyticPulse
Super User
Super User

hi,

The default number of retries for the Value.WaitFor function in Power Query M is 3.

In your code snippet, you have explicitly specified the number of retries as 5 using the parameter (iteration) => 5, which means the function will attempt the operation a maximum of 5 times before throwing an error if it encounters a 500 response code.

If you don't specify the number of retries, the function will default to 3 retries.

accept this reply as solution if this resolved your doubt.

If this helped, Follow this blog for more insightful information about data analytics
https://analyticpulse.blogspot.com/
Please Subscribe AnalyticPulse on YouTube for future updates:
https://www.youtube.com/@AnalyticPulse
Please subscribe CogniJourney On Youtube For Daily fun facts:
https://www.youtube.com/@CogniJourney

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors