From f82b8a85c0153a30229771052d670e8067a1ae07 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com> Date: Fri, 31 Oct 2025 10:22:57 +0000 Subject: [PATCH] better logging --- .../security/controller/api/InviteLinkController.java | 6 +++++- frontend/public/locales/en-GB/translation.json | 3 ++- .../shared/config/configSections/PeopleSection.tsx | 7 +++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/app/proprietary/src/main/java/stirling/software/proprietary/security/controller/api/InviteLinkController.java b/app/proprietary/src/main/java/stirling/software/proprietary/security/controller/api/InviteLinkController.java index 048ed178b..5ce637259 100644 --- a/app/proprietary/src/main/java/stirling/software/proprietary/security/controller/api/InviteLinkController.java +++ b/app/proprietary/src/main/java/stirling/software/proprietary/security/controller/api/InviteLinkController.java @@ -121,7 +121,11 @@ public class InviteLinkController { .body( Map.of( "error", - "Maximum number of users reached for your license")); + "License limit reached (" + + (currentUserCount + activeInvites) + + "/" + + maxUsers + + " users). Contact your administrator to upgrade your license.")); } } diff --git a/frontend/public/locales/en-GB/translation.json b/frontend/public/locales/en-GB/translation.json index a00ca634d..1131afb60 100644 --- a/frontend/public/locales/en-GB/translation.json +++ b/frontend/public/locales/en-GB/translation.json @@ -4525,7 +4525,8 @@ "copied": "Link copied to clipboard", "success": "Invite link generated successfully", "successWithEmail": "Invite link generated and sent via email", - "emailFailed": "Email failed to send", + "emailFailed": "Invite link generated, but email failed", + "emailFailedDetails": "Error: {0}. Please share the invite link manually.", "error": "Failed to generate invite link" }, "inviteMode": { diff --git a/frontend/src/proprietary/components/shared/config/configSections/PeopleSection.tsx b/frontend/src/proprietary/components/shared/config/configSections/PeopleSection.tsx index cee9d03f8..d653d74db 100644 --- a/frontend/src/proprietary/components/shared/config/configSections/PeopleSection.tsx +++ b/frontend/src/proprietary/components/shared/config/configSections/PeopleSection.tsx @@ -241,6 +241,13 @@ export default function PeopleSection() { alertType: 'success', title: t('workspace.people.inviteLink.successWithEmail', 'Invite link generated and email sent!') }); + } else if (inviteLinkForm.sendEmail && response.emailError) { + // Email was requested but failed + alert({ + alertType: 'warning', + title: t('workspace.people.inviteLink.emailFailed', 'Invite link generated, but email failed'), + body: t('workspace.people.inviteLink.emailFailedDetails', 'Error: {0}. Please share the invite link manually.').replace('{0}', response.emailError) + }); } else { alert({ alertType: 'success',