Method: MHV::UserAccount::Creator#perform

Defined in:
app/services/mhv/user_account/creator.rb

#performObject



15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'app/services/mhv/user_account/creator.rb', line 15

def perform
  validate!
  create_mhv_user_account!
rescue ActiveModel::ValidationError, Errors::ValidationError => e
  log_error(e, :validation)
  raise Errors::ValidationError, e.message
rescue Common::Client::Errors::Error => e
  log_error(e, :client)

  raise Errors::MHVClientError.new(e.message, e.body)
rescue => e
  log_error(e, :creator)
  raise Errors::CreatorError, e.message
end