CruGlobal/mpdx — pull request #208 by draffensperger (2014-12-10 22:18:23+00:00)
Title: Fix prayerletters 400 err handling on create contact, monitor cases

I saw an error in Errbit today which seemed to be a stack overflow caused by a 400 bad request error from prayerletters.com. I've fixed the logic for the OAuth2 rest client call and added a spec for it.

In my personal prayerletters.com account, that 400 error was caused by a church organization was imported (not sure by what) with no people underneath it. I added code to log the contact parameters in Errbit so that we can monitor those cases and look for an underlying pattern (e.g. are they all churches/organizations?)

I'm not 100% sure this fixes the stack overflow per se as I didn't successfully reproduce it locally, but my hope is that by fixing and simplifying the handling for the 400 error that will either go away or be more obvious as to what's causing it.