Skip to content

Use the ErrorWithStatus+try & except pattern for layer errors #89

Description

@ca-scribner

_update_layer() may catch a ChangeError emitted when doing a container.add_layer(). In _update_layer() we directly set the unit's status to Blocked based on this. This is different from our usual pattern of, when a helper has an opinion about a status to set, emitting an ErrorWithStatus which suggests the status of the charm.

We should also think about the type of status set here. Should it be Blocked, or Error?

See [this conversation[(https://github.com//pull/82#discussion_r1130979299) for more details

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions