Skip to content

internal/rest/resources/cluster: Return 404 when member is not found - #750

Merged
roosterfish merged 1 commit into
canonical:v3from
claudiubelu:v3-return-404-member-not-found
Jun 11, 2026
Merged

internal/rest/resources/cluster: Return 404 when member is not found#750
roosterfish merged 1 commit into
canonical:v3from
claudiubelu:v3-return-404-member-not-found

Conversation

@claudiubelu

Copy link
Copy Markdown
Contributor

clusterMemberDelete is returning a SmartError when the given member is absent from the truststore. This makes it difficult for callers to distinguish "not found" from a real internal error.

Switch to NotFound error, so callers can use IsNotFoundError to treat an already-absent member as a success.

@claudiubelu
claudiubelu force-pushed the v3-return-404-member-not-found branch 2 times, most recently from 5d275d1 to a49daff Compare June 11, 2026 11:44
…rors

clusterMemberDelete is returning a SmartError when the given member is absent
from the truststore. This makes it difficult for callers to distinguish "not found"
from a real internal error.

Switch to NotFound error, so callers can use IsNotFoundError to treat an
already-absent member as a success.

Additionally switched other client-related errors into BadRequest.

(cherry picked from commit b1b192d)
Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
@claudiubelu
claudiubelu force-pushed the v3-return-404-member-not-found branch from a49daff to ca94791 Compare June 11, 2026 12:00

@roosterfish roosterfish left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ty!

@roosterfish
roosterfish merged commit bc21320 into canonical:v3 Jun 11, 2026
7 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