feat: handle already invited user (#8912)

This commit is contained in:
Shivam Mishra
2024-02-13 08:51:42 +05:30
committed by GitHub
parent 0158a55845
commit e662336eaf
2 changed files with 17 additions and 2 deletions

View File

@@ -43,7 +43,11 @@ class Api::V1::Accounts::AgentsController < Api::V1::Accounts::BaseController
inviter: current_user,
account: Current.account
)
builder.perform
begin
builder.perform
rescue ActiveRecord::RecordInvalid => e
Rails.logger.info "[Agent#bulk_create] ignoring email #{email}, errors: #{e.record.errors}"
end
end
head :ok
end