Merge pull request #9033 from colinux/dolist-notify-no-contact

Tech: notifie les devs lorsque le status d'un contact n'existe pas chez Dolist
This commit is contained in:
Colin Darie 2023-05-11 15:05:38 +00:00 committed by GitHub
commit 0aa1b43e00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -154,7 +154,14 @@ module Dolist
fields = post(url, body).fetch("FieldList", [])
return nil if fields.empty?
if fields.empty?
Sentry.with_scope do |scope|
scope.set_extra(:email, email_address)
Sentry.capture_message("Dolist::API: contact not found")
end
return nil
end
fields.find { _1['ID'] == 72 }.fetch('Value')
end