-
Notifications
You must be signed in to change notification settings - Fork 295
Open
Labels
Azure.CoreThe azure_core crateThe azure_core crateClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.CodeGenIssues that relate to code generationIssues that relate to code generation
Milestone
Description
RetryPolicy currently returns an error when it receives a non-retriable, non-2xx response:
azure-sdk-for-rust/sdk/typespec/typespec_client_core/src/http/policies/retry/mod.rs
Lines 168 to 181 in 65ef3f7
if !RETRY_STATUSES.contains(&status) { | |
debug!( | |
"server returned error status which will not be retried: {}", | |
status | |
); | |
// Server didn't return a status we retry on so return early | |
let error = Error::full( | |
error_kind, | |
http_error, | |
format!( | |
"server returned error status which will not be retried: {status}" | |
), | |
); | |
return Err(error); |
In the abstract, this is strange because the policy's responsibility is to obtain a non-retriable response, retrying requests as necessary according to its configuration. Interpreting those responses is the caller's responsibility. Concretely, this behavior creates practical difficulties for callers who expect such a response (e.g., a client may elicit an authentication challenge) or want to handle it with a different error type.
Metadata
Metadata
Labels
Azure.CoreThe azure_core crateThe azure_core crateClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.CodeGenIssues that relate to code generationIssues that relate to code generation
Type
Projects
Status
Not Started