Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ca-scribner opened this issue Mar 9, 2023 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@ca-scribner
Copy link
Contributor

_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

@ca-scribner ca-scribner added the enhancement New feature or request label Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant