Could you please let me know how to retry when an HTTP response code is 409 Conflict with @azure/core-pipeline-rest package?
As far as reading the code, the package seems to use 408, 500, 502-504, 506 or more as response codes that are need to retry.
|
/** |
|
* A response is a retry response if it has status codes: |
|
* - 408, or |
|
* - Greater or equal than 500, except for 501 and 505. |
|
*/ |
|
export function isExponentialRetryResponse(response?: PipelineResponse): boolean { |
|
return Boolean( |
|
response && |
|
response.status !== undefined && |
|
(response.status >= 500 || response.status === 408) && |
|
response.status !== 501 && |
|
response.status !== 505 |
|
); |
|
} |
Or please add 409 to the retry target status code.
Background:
We are trying to develop a GitHub actions aca-review-apps that operates revision status of Azure Container Apps and uses @azure/core-pipeline-rest via @azure/arm-appcontainers.
If the operation by the action and the one from Azure portal are conflicted, then Azure platform returns HTTP 409 error as the action result. In this case we think it's needed to retry the operation.
Could you please let me know how to retry when an HTTP response code is
409 Conflictwith@azure/core-pipeline-restpackage?As far as reading the code, the package seems to use
408,500,502-504,506or more as response codes that are need to retry.azure-sdk-for-js/sdk/core/core-rest-pipeline/src/retryStrategies/exponentialRetryStrategy.ts
Lines 81 to 94 in 8299623
Or please add
409to the retry target status code.Background:
We are trying to develop a GitHub actions aca-review-apps that operates revision status of Azure Container Apps and uses
@azure/core-pipeline-restvia@azure/arm-appcontainers.If the operation by the action and the one from Azure portal are conflicted, then Azure platform returns HTTP 409 error as the action result. In this case we think it's needed to retry the operation.