Description
Current Behavior
This issue addresses the need for more specific error feedback when user invitations fail.
Currently, all user invitation failures result in a generic error message:
Invitation to ${inviteeFirstName} ${inviteeLastName} failed.
This message does not provide insight into the specific reason for the failure.
Desired Behavior
The system should return distinct error messages based on the actual cause of the invitation failure. These specific error messages should be derived from the error handling logic within cloud/handlers/users.go
.
For example, instead of a generic failure message, users should see messages like:
"Invitation failed: Email address already exists."
"Invitation failed: Invalid email format."
"Invitation failed: User limit reached for the organization." (These are illustrative examples; actual messages will depend on the specific error conditions in cloud/handlers/users.go)