vc3 / connectwise-rest-api

Nodejs Module for Connectwise's REST API
http://vc3.github.io/connectwise-rest-api
MIT License
11 stars 9 forks source link

Feature: Better Error Handling #13

Open sgtoj opened 6 years ago

sgtoj commented 6 years ago

Errors caused by CW Manage API throws an Error object that includes a response property. The problem is, it is a steam. That stream should handled and JSON.parse() before adding it to the Error object and throwing it back to the requester.

This would be consistent with the way all other successful API requests are handled.