When a request to the Infusionsoft API returns something other than a 200 response, we aren't able to determine the reason for the error as the response code/body isn't being logged:
In another non-Rails application we maintain, we log the failing Infusionsoft API response code/body as those can be helpful. I.e. 401 Unauthorized when a token is invalid, or seeing a 404 if we try to update a non-existent contact, or a 500 error if it's an issue on Infusionsoft's side (which we've encountered before).
Even something as simple as logging the err object would go a long way in helping us when it comes to troubleshooting issues with the Infusionsoft API. E.g.:
When a request to the Infusionsoft API returns something other than a 200 response, we aren't able to determine the reason for the error as the response code/body isn't being logged:
In another non-Rails application we maintain, we log the failing Infusionsoft API response code/body as those can be helpful. I.e. 401 Unauthorized when a token is invalid, or seeing a 404 if we try to update a non-existent contact, or a 500 error if it's an issue on Infusionsoft's side (which we've encountered before).
Even something as simple as logging the
err
object would go a long way in helping us when it comes to troubleshooting issues with the Infusionsoft API. E.g.:I can create a PR for this if you'd like.