Closed
Description
Three months ago, in late February, #625 was merged. It added azure_core::error::Error
and migrated a few SDKs. Earlier this week, #766 was merged to migrate all of the generated services. These still need to be migrated.
- sdk/core HttpClient::execute_request2 @cataggar update execute_request2 to use error::Error instead of HttpError #779
- sdk/identity @cataggar migrate azure_identity to
azure_core::error::Error
#781 - sdk/security_keyvault @johnbatty Migrate security_keyvault to new azure_core::error scheme #782
- sdk/data_tables @johnbatty Migrate data_tables to new azure_core::error scheme #805
- sdk/device_update @mfrw Migrate sdk/storage_blob to azure_core::error scheme #794
- sdk/iot_hub @cataggar
azure_core::error::Error
forazure_iot_hub
#801 - sdk/storage @johnbatty Migrate storage to new azure_core::error scheme #792
- sdk/storage_blobs @rickrain Migrate sdk/storage_blob to azure_core::error scheme #794
- sdk/storage_datalake @roeap Migrate storage_datalake to
azure_core::error::Error
#795 - sdk/storage_queues @johnbatty Migrate storage_queues to new azure_core::error scheme #800
- sdk/messaging_servicebus @danbugs Implemented
messaging_servicebus
crate #770 - sdk/core remove legacy errors from azure_core #806
After that, we can remove the existing azure_core::Error
& azure_core::HttpError
and friends.
Migration is more tedious than difficult. A bunch of .map_error
can be removed. others can be replaced with .context(ErrorKind::SomeKind, "some message"
. If a formatted message is useful, then something like:
HeaderValue::from_str(&self.header).with_context(
ErrorKind::DataConversion,
|| {
format!(
"user agent '{}' cannot be serialized as an ascii-only HTTP header
self.header
)
},
)?;