Open danielszaniszlo opened 3 days ago
Hi @danielszaniszlo, this exception is thrown when all polling strategies return false when calling canPoll
. In the generated code only the custom strategy is added and that uses the default canPoll
for the super type OperationResourcePollingStrategy
which simply checks:
If one, or both, of those fail this exception will be thrown. This is a case where some debugging is needed on the initial response to make sure the above holds true.
HI @alzimmermsft, Thanks for the quick reply. The polling endpoint url is valid and the initial response is successful too, but it doesn't have the operation-location
Header.
What URL should be in the operation-location
header?
In our case the request PUT https://endpoint/jobs/{name} is the original request which creates a job and with GET https://endpoint/jobs/{name} you can query the created job status
Pulling in @srnagar and @weidongxu-microsoft as this differs from the expected pattern of OperationResourcePollingStrategy
polling. Do we have any design recommendations for the pattern above?
Query/Question Hello Experts, I am reaching out to seek your expertise regarding an implementation challenge I am facing with testing our API, which supports two primary use cases: Real-time and Batch processing. Context:
Issue: My challenge revolves around the implementation of Long-Running Operations (LROs) for job creation. Specifically, I am looking for guidance on how to use the
SyncPoller
in this context. I am sending my requests to a LIVE environment and my RealTime test cases are passing. Here is my draft PR where you can find the code: https://github.com/Azure/azure-sdk-for-java/pull/40725My test setup with client configuration
sdk/healthdataaiservices/azure-health-deidentification/src/test/java/com/azure/health/deidentification/batch/SyncJobOperationsTest.java
When I am doing it I get the followinng error:
java.lang.IllegalStateException: Cannot poll with strategy SyncOperationLocationPollingStrategy
Why is this not a Bug or a feature Request? It is probably my lack of knowledge with the Java SDK.
Setup (please complete the following information if applicable):
Library/Libraries: [e.g. com.azure:azure-core:1.16.0 (groupId:artifactId:version)]
Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report