add error_message on curl error+json_decode error
Handle JSON decode errors in API requests, throw synthetic error.
Merge pull request #1596 from GiantRobot/CRM-13343

Handle JSON decode errors in API requests, throw synthetic error.