Update UI to display user-friendly error message when claiming fails due to existing claim
Summary
When attempting to create an organization with a path that already exists in another cell, the Topology Service correctly returns a GRPC::AlreadyExists error. However, the UI currently does not display a user-friendly error message to inform users that the organization already exists.
Context
During verification of the transactional claiming behavior in #506 (comment 2878610051), we observed that:
- The backend correctly detects conflicts when trying to create an organization with a path that already exists
- The Topology Service returns
GRPC::AlreadyExistsexception - The Rails logs show:
"exception.class":"GRPC::AlreadyExists" - However, the UI does not display a clear error message to the user
Current Behavior
When a user attempts to create an organization with a path that already exists:
- The operation fails (as expected)
- The UI shows a generic error or no clear feedback
- Users are not informed that the organization path is already taken
Expected Behavior
When a user attempts to create an organization with a path that already exists:
- The UI should display a clear, user-friendly error message such as:
- "Organization path already exists"
- "This organization name is already taken. Please choose a different name."
- The error should be displayed in the organization creation form
- The user should be able to easily retry with a different organization path
Acceptance Criteria
-
UI displays a user-friendly error message when GRPC::AlreadyExistsis returned from the Topology Service -
Error message clearly indicates that the resource path/name already exists -
Error message is displayed in the appropriate location in the organization creation form -
User can easily retry with a different organization path without losing other form data
Related Issues
- Parent issue: #506 (closed)
- Verification note: #506 (comment 2878610051)
Edited by Tarun Khandelwal