Skip to content

How to retry when response code is 409 #23298

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Azure.CoreMgmtThis issue is related to a management-plane library.needs-author-feedbackWorkflow: More information is needed from author to address the issue.no-recent-activityThere has been no recent activity on this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions