-
Notifications
You must be signed in to change notification settings - Fork 27
Closed
Description
When making a call such as:
hyperwalletManager.getHyperwallet().listUsers({ "email" : emailAddress }, function(err, users){
...
});
A TypeError is thrown when no results are returned, due to the fact that the 204 No Content response does not include a "Content-Type" header.
TypeError: Cannot read property 'indexOf' of undefined
at /Users/aaron/WaitrInc/hyperwallet-node-sdk/src/utils/ApiClient.js:175:88
The following conditional does not check the status code before executing indexOf against the non-existent res.header["content-type"] array.
https://github.com/hyperwallet/node-sdk/blob/master/src/utils/ApiClient.js#L175
I have a PR which fixes this issue and also includes an additional test to cover this case.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels