Commit 1bc94c7d by Marcus Efraimsson Committed by GitHub

Merge pull request #12088 from thurt/12087-better-error-when-smtp-not-configured

inviting users: show friendlier error message when smtp is not configured
parents e6f2811b b487aa3e
......@@ -74,6 +74,9 @@ func AddOrgInvite(c *m.ReqContext, inviteDto dtos.AddInviteForm) Response {
}
if err := bus.Dispatch(&emailCmd); err != nil {
if err == m.ErrSmtpNotEnabled {
return Error(412, err.Error(), err)
}
return Error(500, "Failed to send email invite", err)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment