Skip to content

Customize response check for retry and error #3154

@jaschrep-msft

Description

@jaschrep-msft

Feature Summary

Configurable code to determine whether a given HTTP response is retriable or even an error in the first place.

Feature Description

Azure SDK in other languages has the concept of a "response classifier" which determines whether the retry policy should retry it as well as whether it is considered an error. There is a default classifier that can be replaced at the pipeline level as well as the request level.

This allows services with specialty needs on retry or error classification to achieve that goal independent of the code that actually operates based on that knowledge, allowing use of default retry and logging policies instead of requiring custom ones.

Use Case

APIs where a 4xx response is part of standard workflow (e.g. checking if blob exists) need to prevent classification as an error (e.g. by an error logger).

Alternatives

No response

Additional Context

issue #2190

Metadata

Metadata

Assignees

No one assigned

    Labels

    Azure.CoreThe azure_core cratedesign-discussionAn area of design currently under discussion and open to team and community feedback.

    Projects

    Status

    Not Started

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions