Mailchimp subscription not working.

When trying to subscribe to opt-in this message shows up:

Something went wrong, please try again.

Info by Predrag:
The issue seems specific to member's API because my MC API key works fine.
Also, when I try member's API on my installation it doesn't work there as well and there's 500 error in console.
Below is debug.log from my installation with member's API key.