From bd91aa4452b4265729d88be76204d5b476de19da Mon Sep 17 00:00:00 2001 From: IJ Kim Date: Tue, 22 Sep 2015 09:45:44 -0400 Subject: [PATCH] added contact update error handling --- lib/sf/contact.rb | 4 ++-- lib/sf/version.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/sf/contact.rb b/lib/sf/contact.rb index 2586389..7087940 100644 --- a/lib/sf/contact.rb +++ b/lib/sf/contact.rb @@ -34,7 +34,7 @@ def respond_to_missing?(method_name, include_private = false) def update(args={}) params = {'Id' => self.Id} args.map {|k,v| params[k] = v} - Sf.client.update("Contact", params) + Sf.client.update!("Contact", params) end def set_person_by_email(email) @@ -73,7 +73,7 @@ def create_from_person! def update_from_person! begin - update!(self.attrs_from_person) if self.Id.present? + update(self.attrs_from_person) if self.Id.present? rescue Exception => e self.person.errors[:base] << e.to_s nil diff --git a/lib/sf/version.rb b/lib/sf/version.rb index d5d0f93..4fbc4f6 100644 --- a/lib/sf/version.rb +++ b/lib/sf/version.rb @@ -1,3 +1,3 @@ module Sf - VERSION = "0.1.29" + VERSION = "0.1.30" end