DrewM\MailChimp\MailChimp::formatResponse PHP Method

formatResponse() private method

Decode the response and format any error messages for debugging
private formatResponse ( array $response ) : array | false
$response array The response from the curl request
return array | false The JSON decoded into an array
    private function formatResponse($response)
    {
        $this->last_response = $response;
        if (!empty($response['body'])) {
            return json_decode($response['body'], true);
        }
        return false;
    }