{"id":28705,"date":"2026-12-01T13:44:04","date_gmt":"2026-12-01T13:44:04","guid":{"rendered":"https:\/\/capskip.com\/?p=28705"},"modified":"2026-12-01T13:44:04","modified_gmt":"2026-12-01T13:44:04","slug":"polly-captcha-retry","status":"publish","type":"post","link":"https:\/\/capskip.com\/zh\/polly-captcha-retry\/","title":{"rendered":"C# \u4e2d\u7684 Polly \u9a8c\u8bc1\u7801\u91cd\u8bd5\uff1a\u91cd\u8bd5\u3001\u8d85\u65f6\u548c breaker"},"content":{"rendered":"<p>A Polly captcha retry has one job: run a fresh solve when the last one failed for a reason a second try can fix, and stop at once when it can&#8217;t. In Polly 8 that is a single ResiliencePipeline around CapSkipClient.RecaptchaAsync. The defaults suit an ordinary HTTP call, not a solver: a result can be read only once, the SDK checks its deadline late, and some failures repeat identically. The SDK basics are on the <a href=\"https:\/\/capskip.com\/csharp-captcha-solver\/\">C# CAPTCHA solver<\/a> page, and the plain flow without retries is in <a href=\"https:\/\/capskip.com\/recaptcha-v2-csharp\/\">reCAPTCHA v2 in C#<\/a>.<\/p>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">What you need<\/h2>\n<ul>\n<li>CapSkip running on a Windows PC, the CapSkip NuGet package 1.8.0 and Polly.Core 8.9.1, the versions I ran.<\/li>\n<li>Polly.Core ships assets for .NET Framework 4.6.2, .NET Standard 2.0 and .NET 6, 8 and 10, and CapSkip targets .NET Standard 2.0, so .NET 6 is the higher floor on current .NET. I ran net8.0 and net10.0 with .NET SDK 10.0.100, and the plain flow on net6.0.<\/li>\n<li>A PowerShell prompt, and a page with a reCAPTCHA v2 widget that you own or may automate, with its sitekey.<\/li>\n<li>An address for CapSkip: 127.0.0.1 in Local mode, which only this device can reach, or your network or public IP in Server mode, which lets this code run on another PC. You pick the mode in the <a href=\"https:\/\/capskip.com\/setup-guide\/#connection-settings\">connection settings<\/a>.<\/li>\n<\/ul>\n<p>How this was tested: no real CapSkip and no real site took part. A mock of in.php and res.php and a mock form page stood in, with the real CapSkip and Polly.Core packages on Windows 11 (build 10.0.26200). Timings are one stopwatch run each on net10.0, repeated on net8.0, unless I say otherwise.<\/p>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">Which CapSkip failures are worth a Polly captcha retry?<\/h2>\n<p>A retry means one thing: submit a new task. The SDK source treats an empty body, which is what CapSkip sends after a token was read, as not ready. Polling an id again after its token was read made the call wait out its whole timeout and throw CapSkip.TimeoutException. So a retry calls RecaptchaAsync again and never polls the old id. The table below comes from the SDK source for what each exception means and from the CapSkip API docs for the codes.<\/p>\n<table>\n<thead>\n<tr>\n<th>What you catch<\/th>\n<th>When it is raised<\/th>\n<th>Retry?<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>NetworkException<\/td>\n<td>The submit failed: connection refused or dropped, or CapSkip answered with a status other than 200<\/td>\n<td>Yes<\/td>\n<\/tr>\n<tr>\n<td>CapSkip.TimeoutException<\/td>\n<td>The SDK deadline passed while it polled<\/td>\n<td>Yes, inside a budget<\/td>\n<\/tr>\n<tr>\n<td>TimeoutRejectedException<\/td>\n<td>The Polly attempt timeout fired<\/td>\n<td>Yes<\/td>\n<\/tr>\n<tr>\n<td>ApiException with ERROR_CAPTCHA_UNSOLVABLE<\/td>\n<td>The solve failed inside CapSkip<\/td>\n<td>Yes<\/td>\n<\/tr>\n<tr>\n<td>ApiException with ERROR_NO_SLOT_AVAILABLE<\/td>\n<td>CapSkip is busy or the key hit its request limit<\/td>\n<td>Yes, after a wait<\/td>\n<\/tr>\n<tr>\n<td>ApiException with any other code<\/td>\n<td>A rejected key, sitekey, page address or task<\/td>\n<td>No<\/td>\n<\/tr>\n<tr>\n<td>ValidationException<\/td>\n<td>An option the method does not take, refused before any request<\/td>\n<td>No<\/td>\n<\/tr>\n<tr>\n<td>BrokenCircuitException<\/td>\n<td>The breaker from Step 1 is open<\/td>\n<td>No, fail fast<\/td>\n<\/tr>\n<tr>\n<td>OperationCanceledException<\/td>\n<td>Your own token fired<\/td>\n<td>No<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>NetworkException leaves the SDK only from the submit step: while it polls, the SDK catches that exception and keeps waiting. I dropped every connection 2 seconds into a solve (SDK timeout 6 s, polling interval 1 s) and the call carried on, then threw CapSkip.TimeoutException after 6.91 s. A CapSkip that dies mid-solve looks like a slow solve, never like a network error. ApiException has no code property, so the pipeline matches its message text.<\/p>\n<p>What the table rests on: the first three exception rows and ValidationException come from the source, and I reproduced each against the mock. The error codes rest on the docs, not on a real CapSkip. A failed reCAPTCHA task reads ERROR_CAPTCHA_UNSOLVABLE on res.php, a site key Google refused included, so a bad sitekey uses all its retries. ERROR_NO_SLOT_AVAILABLE means retry after a short wait. The mock used ERROR_GOOGLEKEY for the permanent kind. If you changed the failure text under Settings, match your text instead.<\/p>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">Step 1: build the Polly captcha retry pipeline, with a breaker and two timeouts<\/h2>\n<p>Create a console project and add both packages.<\/p>\n<div data-no-translation>\n<pre data-enlighter-language=\"bash\" class=\"EnlighterJSRAW\">dotnet new console -o polly-demo\ncd polly-demo\ndotnet add package CapSkip --version 1.8.0\ndotnet add package Polly.Core<\/pre>\n<\/div>\n<p>Paste the three code blocks of this guide into Program.cs in order, starting with this one. Strategies run from the outside in, so the order is the design. The budget covers the whole job, the breaker sits inside the retry so every attempt counts toward it, and the attempt timeout wraps one solve from submit to token.<\/p>\n<div data-no-translation>\n<pre data-enlighter-language=\"csharp\" class=\"EnlighterJSRAW\">using System.Net;\nusing CapSkip;\nusing Polly;\nusing Polly.CircuitBreaker;\nusing Polly.Retry;\nusing Polly.Timeout;\n\nstatic class Pipelines\n{\n    static readonly TimeSpan Budget = TimeSpan.FromSeconds(150);   \/\/ one job, all retries included\n    static readonly TimeSpan Attempt = TimeSpan.FromSeconds(60);   \/\/ one solve, submit to token\n    static readonly TimeSpan FirstDelay = TimeSpan.FromSeconds(2);\n    static readonly TimeSpan BreakFor = TimeSpan.FromSeconds(30);\n\n    \/\/ Decides which failures earn a NEW solve task. Your own cancellation never does.\n    static bool WorthRetrying(Exception? e, CancellationToken ct) =&gt; !ct.IsCancellationRequested &amp;&amp; e switch\n    {\n        NetworkException =&gt; true,\n        CapSkip.TimeoutException =&gt; true,\n        TimeoutRejectedException =&gt; true,   \/\/ the attempt timeout below\n        ApiException a =&gt; a.Message.Contains(&quot;ERROR_CAPTCHA_UNSOLVABLE&quot;)\n                          || a.Message.Contains(&quot;ERROR_NO_SLOT_AVAILABLE&quot;),\n        _ =&gt; false,                         \/\/ ValidationException, other API errors, anything else\n    };\n\n    \/\/ Build it once and share it: the circuit breaker keeps its count inside this instance.\n    public static readonly ResiliencePipeline&lt;SolveResult&gt; Solve =\n        new ResiliencePipelineBuilder&lt;SolveResult&gt;()\n            .AddTimeout(Budget)\n            .AddRetry(new RetryStrategyOptions&lt;SolveResult&gt;\n            {\n                ShouldHandle = a =&gt; ValueTask.FromResult(WorthRetrying(a.Outcome.Exception, a.Context.CancellationToken)),\n                MaxRetryAttempts = 2,\n                Delay = FirstDelay,\n                BackoffType = DelayBackoffType.Exponential,\n                UseJitter = true,\n            })\n            .AddCircuitBreaker(new CircuitBreakerStrategyOptions&lt;SolveResult&gt;\n            {\n                \/\/ Only NetworkException trips it: CapSkip unreachable, or a status other than 200.\n                \/\/ ApiException does not count.\n                ShouldHandle = a =&gt; ValueTask.FromResult(\n                    a.Outcome.Exception is NetworkException &amp;&amp; !a.Context.CancellationToken.IsCancellationRequested),\n                FailureRatio = 1.0,\n                MinimumThroughput = 3,\n                SamplingDuration = TimeSpan.FromSeconds(30),\n                BreakDuration = BreakFor,\n            })\n            .AddTimeout(Attempt)\n            .Build();\n}<\/pre>\n<\/div>\n<p>Build the pipeline once and keep it in a static field, because the breaker counts inside the instance. One built for every job never opened: six jobs against a dead mock gave six NetworkException and no BrokenCircuitException (a breaker-only pipeline, net10.0).<\/p>\n<p>UseJitter spreads delays widely: over 40 runs of four retries from a 1 second base (a plain Polly pipeline, net10.0) they ran from 0.06 s to 8.01 s.<\/p>\n<p>The SDK checks recaptchaTimeout only when it polls. Against a mock task that never finished, recaptchaTimeout 8 s with pollingInterval 5 s threw CapSkip.TimeoutException after 12.85 s. The poll interval had grown to 5 s, and a poll at 7.75 s still found time left. With pollingInterval 1 s it threw after 8.93 s. A Polly timeout has no such lag: a pipeline holding only an 8 s attempt timeout threw TimeoutRejectedException after 8.03 s, and the mock saw no more polls in the next 4 s. That needs the lambda to hand its token to the SDK. Without it, a 5 s Polly timeout changed nothing and the call ended at the SDK deadline, after 13.00 s. So the SDK timeout stays a backstop above the attempt timeout, 90 s against 60 s in the example.<\/p>\n<p>With an attempt timeout of 5 s, a budget of 12 s and a first delay of 1 s, two runs against a mock that never finished ended with TimeoutRejectedException at 12.04 s and 12.03 s, after two or three submits. The SDK has no call that cancels a task, so a timed-out attempt may leave its task running until the Row Timeout stops it, and Max. Threads limits concurrent solves per CAPTCHA type. Both come from the setup guide, not from a run. That is why the retry count is 2 and not 10. CapSkip has its own Retries setting (1 by default) and a reCAPTCHA Row Timeout of 250 seconds, so size Attempt to your settings.<\/p>\n<p>The breaker answers a CapSkip that is down or answering HTTP 503. Against a mock that dropped every connection, with a 200 ms first delay and a 5 s break, the first job made 3 attempts in 0.59 s and the circuit opened. The next five failed with BrokenCircuitException after 0.00 s each, with no new connection at the mock. Three 503 answers did the same: the first job ended with NetworkException, bad response: 503, after 0.52 s, and the next five failed after 0.00 s. After the break, one job went through as a probe, the circuit closed and it solved in 0.78 s. Catch BrokenCircuitException where you queue work and requeue the job.<\/p>\n<p>The breaker ignores ApiException, because CapSkip answered, and ValidationException, which is a bug of yours. It ignores timeouts, because a slow solve is not a dead app, and your own cancellation, which is why its predicate reads the token. Given the mid-solve finding above, it guards only the submit step. One edge: an attempt timeout that fires during the submit surfaces as NetworkException, so the retry and the breaker both see a network failure (in.php held 2 s, timeout 0.5 s: the job ended after 0.51 s, and the mock logged the submit about 2 s later).<\/p>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">Step 2: retry the target site 429 in a second pipeline<\/h2>\n<p>The site you send the token to has different failures, so it gets its own pipeline. A 429 is an HttpResponseMessage, not an exception, so the predicate reads the result, the wait comes from Retry-After instead of your backoff, and it must not use up solve retries or trip the CapSkip breaker. The <a href=\"https:\/\/capskip.com\/http-429-too-many-requests\/\">HTTP 429 guide<\/a> covers telling a rate limit from a bot block. <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Reference\/Headers\/Retry-After\" rel=\"noopener nofollow\" target=\"_blank\">Retry-After<\/a> arrives as seconds or as an HTTP date, and the block reads both.<\/p>\n<div data-no-translation>\n<pre data-enlighter-language=\"csharp\" class=\"EnlighterJSRAW\">static class RateLimit\n{\n    const double GiveUpAfter = 60;   \/\/ seconds; a longer Retry-After goes back to the caller\n\n    \/\/ Retry-After is either delay-seconds or an HTTP date.\n    static double? WaitSeconds(HttpResponseMessage r)\n    {\n        var h = r.Headers.RetryAfter;\n        if (h?.Delta is { } delta) return delta.TotalSeconds;\n        if (h?.Date is { } date) return Math.Max(0, (date - DateTimeOffset.UtcNow).TotalSeconds);\n        return null;\n    }\n\n    public static readonly ResiliencePipeline&lt;HttpResponseMessage&gt; Pipeline =\n        new ResiliencePipelineBuilder&lt;HttpResponseMessage&gt;()\n            .AddRetry(new RetryStrategyOptions&lt;HttpResponseMessage&gt;\n            {\n                ShouldHandle = a =&gt; ValueTask.FromResult(\n                    a.Outcome.Result is { StatusCode: HttpStatusCode.TooManyRequests } r\n                    &amp;&amp; (WaitSeconds(r) ?? 0) &lt;= GiveUpAfter),\n                MaxRetryAttempts = 3,\n                Delay = TimeSpan.FromSeconds(2),   \/\/ used when the site sent no Retry-After\n                DelayGenerator = a =&gt; new ValueTask&lt;TimeSpan?&gt;(\n                    a.Outcome.Result is { } r &amp;&amp; WaitSeconds(r) is { } s ? TimeSpan.FromSeconds(s) : null),\n                OnRetry = a =&gt; { a.Outcome.Result?.Dispose(); return default; },\n            })\n            .Build();\n}<\/pre>\n<\/div>\n<p>Add this block below the first one. It retries with the token already in hand, which is a rule of my mock: a 429 does not consume the token. A real site may differ, and a token is short lived, so any wait over 60 seconds comes back to you as the 429, for a new solve. With two 429 answers carrying Retry-After 2, the form post ended in 200 after 4.04 s, with one solve for three form posts. The HTTP date form took 3.71 s, because a date has whole-second resolution. Retry-After 120 returned the 429 after 0.03 s. The lambda builds a new request each attempt, because a message sent twice threw InvalidOperationException.<\/p>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">Step 3: cancellation, two TimeoutException types and the full program<\/h2>\n<p>Pass t, the lambda token, to RecaptchaAsync and your own token to ExecuteAsync. The t token is linked to your token, the budget and the attempt timeout. Cancelling my token 1 second into a solve ended the job after 1.01 s with OperationCanceledException and one submit, so no retry ran. A cancel inside the submit differs. With in.php held for 2 seconds and my token cancelled at 0.5 s, the job ended after 0.51 s with a NetworkException that wrapped a TaskCanceledException, and the mock logged the submit anyway 2.6 s later. That is why the last catch block tests the token first, and why a cancelled job can leave one task behind.<\/p>\n<p>With the implicit usings of a new console project, catch (TimeoutException) next to using CapSkip fails with error CS0104, ambiguous between CapSkip.TimeoutException and System.TimeoutException. Write CapSkip.TimeoutException in full. Neither CapSkip.TimeoutException nor TimeoutRejectedException derives from System.TimeoutException, so catching the System type catches neither.<\/p>\n<p>The last block solves through the first pipeline, posts through the second and maps each outcome to an exit code: 0 for a 2xx answer, 1 for any other status, 2 cancelled, 3 circuit open (only in a process that runs many jobs), 4 out of time, 5 a CapSkip or network error.<\/p>\n<div data-no-translation>\n<pre data-enlighter-language=\"csharp\" class=\"EnlighterJSRAW\">static class Program\n{\n    const string SiteKey = &quot;YOUR_SITEKEY&quot;;\n    const string PageUrl = &quot;https:\/\/example.com\/page-with-recaptcha&quot;;\n    const string FormUrl = &quot;https:\/\/example.com\/submit&quot;;\n\n    static async Task&lt;int&gt; Main()\n    {\n        using var cts = new CancellationTokenSource();\n        Console.CancelKeyPress += (_, e) =&gt; { e.Cancel = true; cts.Cancel(); };\n        var ct = cts.Token;\n\n        \/\/ Local mode. In Server mode, use your server's address. The SDK timeout is a\n        \/\/ backstop above the 60 second attempt timeout, so the Polly timeout is the one you see.\n        var solver = new CapSkipClient(host: &quot;127.0.0.1&quot;, port: 8080, recaptchaTimeout: 90, pollingInterval: 2);\n        using var http = new HttpClient();\n\n        try\n        {\n            \/\/ A retry runs this lambda again, so it submits a NEW task and reads a fresh token.\n            var solved = await Pipelines.Solve.ExecuteAsync(\n                async t =&gt; await solver.RecaptchaAsync(SiteKey, PageUrl, cancellationToken: t), ct);\n\n            var form = new Dictionary&lt;string, string&gt; { [&quot;g-recaptcha-response&quot;] = solved.Code };\n            using var response = await RateLimit.Pipeline.ExecuteAsync(async t =&gt;\n            {\n                \/\/ A request message can be sent once, so every attempt builds its own.\n                using var request = new HttpRequestMessage(HttpMethod.Post, FormUrl)\n                {\n                    Content = new FormUrlEncodedContent(form),\n                };\n                return await http.SendAsync(request, t);\n            }, ct);\n\n            Console.WriteLine($&quot;form post: {(int)response.StatusCode}&quot;);\n            return response.IsSuccessStatusCode ? 0 : 1;\n        }\n        catch (Exception) when (ct.IsCancellationRequested)\n        {\n            Console.WriteLine(&quot;cancelled&quot;);   \/\/ the SDK wraps a cancel during submit, so test the token first\n            return 2;\n        }\n        catch (BrokenCircuitException e)\n        {\n            Console.WriteLine($&quot;CapSkip failing, circuit open: {e.Message}&quot;);\n            return 3;\n        }\n        catch (TimeoutRejectedException)\n        {\n            Console.WriteLine(&quot;out of time for this job&quot;);   \/\/ the total budget, or the last attempt timeout\n            return 4;\n        }\n        catch (Exception e) when (e is CapSkipError or HttpRequestException)\n        {\n            Console.WriteLine($&quot;{e.GetType().Name}: {e.Message}&quot;);   \/\/ not retried, or retries used up\n            return 5;\n        }\n    }\n}<\/pre>\n<\/div>\n<p>A ValidationException or a malformed sitekey (ERROR_GOOGLEKEY in my mock) lands in the last catch: a bug or a bad key. The <a href=\"https:\/\/capskip.com\/api-docs\/\">API docs<\/a> list every error code.<\/p>\n<h3 style=\"font-size:1.15rem;line-height:1.4;\">What the mock showed<\/h3>\n<table>\n<thead>\n<tr>\n<th>Setup (mock, net10.0, jittered waits)<\/th>\n<th>Result<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Two failed solves, then a good one<\/td>\n<td>3 submits, 1 token read, solved after 6.79 s<\/td>\n<\/tr>\n<tr>\n<td>Three failed solves in a row<\/td>\n<td>3 submits, then ApiException ERROR_CAPTCHA_UNSOLVABLE after 6.32 s<\/td>\n<\/tr>\n<tr>\n<td>ERROR_NO_SLOT_AVAILABLE, then a good solve<\/td>\n<td>2 submits, solved after 2.29 s<\/td>\n<\/tr>\n<tr>\n<td>ERROR_GOOGLEKEY on the first submit<\/td>\n<td>1 submit, ApiException after 0.07 s, no retry<\/td>\n<\/tr>\n<tr>\n<td>An option the method does not take<\/td>\n<td>0 requests reached the mock, ValidationException after 0.04 s<\/td>\n<\/tr>\n<tr>\n<td>HTTP 500 on three submits<\/td>\n<td>3 submits, NetworkException with the text bad response: 500 after 5.12 s<\/td>\n<\/tr>\n<tr>\n<td>Connection dropped on the first submit<\/td>\n<td>2 submits, solved after 2.42 s<\/td>\n<\/tr>\n<tr>\n<td>Same id read twice (timeout 3 s, polling 1 s)<\/td>\n<td>CapSkip.TimeoutException after 3.80 s, 5 empty polls<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>On net8.0 the exception types and counts matched, and the unjittered timings were within 0.05 s, except the HTTP date wait (3.31 s).<\/p>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">Running the solver on a server<\/h2>\n<p>Server mode runs CapSkip on a Windows machine you control, so this program can call it from another PC: put that machine&#8217;s address in host and nothing else changes. I tested no second machine. Server mode accepts connections on its port from any address, and the firewall rule it adds allows them all, so a second allow rule restricts nothing. Add a Windows Firewall block rule for the addresses that should not reach that port. Switching modes is described under <a href=\"https:\/\/capskip.com\/setup-guide\/#connection-settings\">connection settings<\/a>.<\/p>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">FAQ<\/h2>\n<details style=\"border:1px solid #e2e5ee;border-radius:10px;padding:14px 18px;margin:0 0 12px;\">\n<summary style=\"cursor:pointer;\">\n<h3 style=\"font-size:1.15rem;line-height:1.4;display:inline;margin:0;\">Should I retry a CapSkip timeout at all?<\/h3>\n<\/summary>\n<p style=\"margin:12px 0 0;\">Yes, within a budget: a timeout can be a CapSkip that vanished mid-solve, and a second task fixes that. Keep the count low, because an abandoned task may still run.<\/p>\n<\/details>\n<details style=\"border:1px solid #e2e5ee;border-radius:10px;padding:14px 18px;margin:0 0 12px;\">\n<summary style=\"cursor:pointer;\">\n<h3 style=\"font-size:1.15rem;line-height:1.4;display:inline;margin:0;\">Does a retry cost another solve?<\/h3>\n<\/summary>\n<p style=\"margin:12px 0 0;\">It costs time and a solve thread on your own CapSkip, not money, since CapSkip is not metered per solve.<\/p>\n<\/details>\n<details style=\"border:1px solid #e2e5ee;border-radius:10px;padding:14px 18px;margin:0 0 12px;\">\n<summary style=\"cursor:pointer;\">\n<h3 style=\"font-size:1.15rem;line-height:1.4;display:inline;margin:0;\">Polly or a job runner such as Hangfire?<\/h3>\n<\/summary>\n<p style=\"margin:12px 0 0;\">Polly retries inside one process and forgets everything when it exits. If a job has to survive a restart, store it in a job runner and keep Polly for the single solve inside it. The <a href=\"https:\/\/capskip.com\/hangfire-captcha-job\/\">Hangfire guide<\/a> covers the stored side.<\/p>\n<\/details>\n<h2 style=\"font-size:1.6rem;line-height:1.35;\">The short version<\/h2>\n<p>A Polly captcha retry comes down to four decisions: retry only the failures a new task can fix, bound every attempt and the whole job, let one shared breaker stop calls while CapSkip is down, and keep the 429 of the target site in its own pipeline. Because the solver is a <a href=\"https:\/\/capskip.com\/\">local captcha solver<\/a> on your own hardware, a retry costs only time. Every retry option is listed in the <a href=\"https:\/\/www.pollydocs.org\/strategies\/retry.html\" rel=\"noopener nofollow\" target=\"_blank\">Polly retry strategy documentation<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u56f4\u7ed5 RecaptchaAsync \u7684 Polly \u7ba1\u7ebf\u5e94\u8be5\u53ea\u91cd\u8bd5\u65b0\u7684\u8bc6\u522b\u80fd\u89e3\u51b3\u7684\u95ee\u9898\u3002\u9488\u5bf9\u6a21\u62df\u670d\u52a1\u7684\u6d4b\u91cf\uff1a\u8be5\u91cd\u8bd5\u54ea\u4e9b CapSkip \u5f02\u5e38\u3001\u5355\u6b21\u5c1d\u8bd5\u548c\u9884\u7b97\u8d85\u65f6\u3001\u4e00\u4e2a circuit breaker\uff0c\u4ee5\u53ca\u4e00\u6761\u5355\u72ec\u7684 429 \u7ba1\u7ebf\u3002<\/p>","protected":false},"author":1,"featured_media":28704,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"Polly CAPTCHA Retry in C#: ResiliencePipeline | CapSkip","rank_math_description":"Polly captcha retry for CapSkip in C#: which SDK exceptions to retry, attempt and total timeouts, a circuit breaker and Retry-After. Copy the pipeline.","rank_math_focus_keyword":"polly captcha retry","footnotes":""},"categories":[70],"tags":[],"class_list":["post-28705","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-captcha"],"_links":{"self":[{"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/posts\/28705","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/comments?post=28705"}],"version-history":[{"count":2,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/posts\/28705\/revisions"}],"predecessor-version":[{"id":28781,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/posts\/28705\/revisions\/28781"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/media\/28704"}],"wp:attachment":[{"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/media?parent=28705"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/categories?post=28705"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/capskip.com\/zh\/wp-json\/wp\/v2\/tags?post=28705"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}