iot-nodejs icon indicating copy to clipboard operation
iot-nodejs copied to clipboard

Application Client - additional api calls for device state functions

Open SoumyaSundar opened this issue 9 years ago • 6 comments

In order to use the api calls implemented in the Application client, it would be very useful to have the entire response object to be returned in the successful fetch to capture the status codes as well as the returned object.

SoumyaSundar avatar Apr 03 '17 15:04 SoumyaSundar

Hi @SoumyaSundar. What type of information from the response would you like to have, and what is the use case you are trying to achieve? I think the best approach would be to continue our current approach of returning parsed data for the API wrappers, but we could certainly include some additional information as a 2nd parameter to the resolve().

bryancboyd avatar Apr 03 '17 15:04 bryancboyd

Hi @bryancboyd, when we call this api from react application at that time just the data is sufficient but for test cases we need the status codes and in general for troubleshooting issues we might need the entire object.

SoumyaSundar avatar Apr 03 '17 15:04 SoumyaSundar

Let's consider just the error case, as a first step. Will the reject() from callApi give enough information to successfully troubleshoot a failed response?

bryancboyd avatar Apr 03 '17 16:04 bryancboyd

Hi Bryan, I've updated the issue title and going to use this number to create and publish the branch.

Thanks, Soumya.

SoumyaSundar avatar Apr 06 '17 16:04 SoumyaSundar

I just merged the branch; closing the issue 👍

bryancboyd avatar Apr 19 '17 12:04 bryancboyd

Ok, thanks.

SoumyaSundar avatar Apr 19 '17 12:04 SoumyaSundar