ruby on rails - Gibbon API does not error, but does not subscribe -


this strange one. i've had working mailchimp, gibbon, ror app going couple of years now, , went go use part of app week , realized integration no longer working. not receiving errors, , basic testing shows exception section of code never called.

here code using:

begin   gb = gibbon::api.new(mailchimp_api_key)   gb.lists.subscribe( id: mailchimp_list_id, email: {email: email} ) rescue gibbon::mailchimperror => e   logger.error "mailchimp threw error. code is: #{e.code}, message: #{e.message}" end 

some code edited readability, assume variables defined , no errors thrown.

what i'm looking debugging help. can't seem find way debug integration know if there silently failing or not. have tips debugging outside of trying catch raised exception?

i use same code , when wrong exception thrown. should check , print subscribeis returning.

response = gb.lists.subscribe( id: mailchimp_list_id, email: {email: email} ) puts response 

according mailchimp documentation should return json 1 :

{     "email": "example email",     "euid": "example euid",     "leid": "example leid" } 

https://apidocs.mailchimp.com/api/2.0/lists/subscribe.php


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -