Skip to content

Commit

Permalink
added contact update error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
ij committed Sep 22, 2015
1 parent e193762 commit bd91aa4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/sf/contact.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/sf/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Sf
VERSION = "0.1.29"
VERSION = "0.1.30"
end

0 comments on commit bd91aa4

Please sign in to comment.