diff --git a/app/controllers/schools/users_controller.rb b/app/controllers/schools/users_controller.rb index 9d850f645..34f72939a 100644 --- a/app/controllers/schools/users_controller.rb +++ b/app/controllers/schools/users_controller.rb @@ -15,8 +15,8 @@ def create begin @user_invite.create redirect_to schools_users_path, notice: "#{@user_invite.email} has been added." - rescue StandardError - flash.notice = "An error occurred while adding #{@user_invite.email}" + rescue StandardError => e + flash.notice = "An error occurred while adding #{@user_invite.email} due to #{e}" render :show, locals: { user_invite: @user_invite } end else