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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.