Skip to content

migrate SDKs to azure_core::error::Error #771

Closed
@cataggar

Description

@cataggar

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.

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
        )
    },
)?;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Epichelp wantedThis issue is tracking work for which community contributions would be welcomed and appreciated

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions