A developer migrates a .NET data loader from raw HttpClient calls to the Dataverse ServiceClient class and asks whether the custom retry code for service protection limit errors must be ported as well. What does ServiceClient do when Dataverse returns a service protection limit error?
Select an answer to reveal the explanation.
Short Explanation
ServiceClient comes with its own patience built in: when Dataverse says wait, it waits for exactly the time it was told, then tries again. You don't need to hand-port your retry loop. You should still keep an eye on how often it's happening, though.
Full Explanation
The Dataverse SDK for .NET clients, ServiceClient and CrmServiceClient, manage service protection API limit errors. When Dataverse returns one, the fault includes a Retry-After TimeSpan in its error details, and the client automatically pauses for that duration and resends the request. Microsoft documents this behavior for CrmServiceClient since 2019 and for ServiceClient as its successor, and recommends replacing low-level proxy classes with these clients precisely because they include it. Porting the custom HttpClient retry logic is therefore unnecessary for service protection errors, although the loader should still handle other failures and could log retries for visibility. Raising the error immediately is how the deprecated OrganizationServiceProxy class behaves, not ServiceClient. Service protection limits are evaluated per user, and there is no alternate endpoint that resets them; ServiceClient does not reroute requests to escape a limit. ServiceClient does not restructure requests into smaller batches or use a fixed one-second delay; it uses the duration the server returns. Exam caveat: automatic retries can mask a design that sends far more load than needed, so bulk operation messages and tuned parallelism still matter for throughput. Operational check: run the loader against a test environment with high parallelism, review the client logs for retry entries, and confirm the job completes without unhandled service protection faults.