fix(dolist): notify us when contact status is not found

This commit is contained in:
Colin Darie 2023-05-11 09:45:32 +02:00
parent bc56f14a72
commit 21df038056
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4

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