FIX: Show the SMTP authentication error for group UI (#27914)

Originally in 964da218173db007fefe6357e96292f5545c513e
we hid the SMTPAuthenticationError message except in
very specific cases. However this message often contains
helpful information from the mail provider, for example
here is a response from Office365:

> 535 5.7.139 Authentication unsuccessful, user is locked by your
organization's security defaults policy. Contact your administrator.

So, we will show the error message in the modal UI instead
of supressing it with a generic message to be more helpful.
This commit is contained in:
Martin Brennan
2024-07-16 09:14:17 +10:00
committed by GitHub
parent 576f880190
commit 00608a19c6
5 changed files with 32 additions and 52 deletions

View File

@ -2799,7 +2799,7 @@ RSpec.describe GroupsController do
post "/groups/#{group.id}/test_email_settings.json", params: params
expect(response.status).to eq(422)
expect(response.parsed_body["errors"]).to include(
I18n.t("email_settings.smtp_authentication_error"),
I18n.t("email_settings.smtp_authentication_error", message: "Invalid credentials"),
)
end
end