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

DB: Remove ErrAlreadyDefined sentinel error. #13252

Merged
merged 7 commits into from
Apr 3, 2024

Conversation

markylaing
Copy link
Contributor

@markylaing markylaing commented Apr 3, 2024

This error is imported by the lxd/request package so that it canconvert it to an http.StatusConflict on a call to response.SmartError. Other applications are using the lxd/request package. Removing this error prevents the import of lxd/db into lxd/request and therefore prevents the import of lxd/db into downstream repositories.

Unblocks canonical/microcluster#97

This error is imported by the `lxd/request` package so that it can
convert it to an `http.StatusConflict` on a call to
`response.SmartError`. Other applications are using the `lxd/request`
package. Removing this error prevents the import of `lxd/db` into
`lxd/request` and therefore prevents the import of `lxd/db` into
downstream repositories.

Signed-off-by: Mark Laing <[email protected]>
This will be caught by `response.SmartError` equivalently to return a
409 to the caller. Additionally, error messages are updated to be more
descriptive.

Signed-off-by: Mark Laing <[email protected]>
@markylaing markylaing self-assigned this Apr 3, 2024
lxd/backup.go Outdated Show resolved Hide resolved
lxd/backup.go Outdated Show resolved Hide resolved
lxd/backup.go Outdated Show resolved Hide resolved
@markylaing
Copy link
Contributor Author

Now failing unit tests. Missed some references.

@tomponline tomponline merged commit c6ec68b into canonical:main Apr 3, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants