Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/js/ZCRMRestClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ var default_user_identifier = "zcrm_default_user";
);
}
else{

console.log("Problem occured while generating access token from refresh token. Response : "+JSON.stringify(response))
reject(resultObj)
throw new Error("Problem occured while generating access token and refresh token from grant token.Response : "+JSON.stringify(response));
}
})
Expand Down Expand Up @@ -335,4 +336,4 @@ ZCRMRestClient.parseAndConstructObject = function(response){

ZCRMRestClient.API = require('./crmapi');

module.exports = ZCRMRestClient;
module.exports = ZCRMRestClient;
9 changes: 8 additions & 1 deletion lib/js/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@ function makeapicall(request){
if(error){
resolve(error);
}
else if(!response){
var respObj = {
"message" : "failed response", //No I18N
"status_code" : "204" //No I18N
}
resolve(JSON.stringify(respObj));
}
else if(response.statusCode == 204){

var respObj = {
Expand Down Expand Up @@ -239,4 +246,4 @@ module.exports = {
constructRequestDetails : constructRequestDetails,
promiseResponse : promiseResponse,

}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zcrmsdk",
"version": "0.0.20",
"version": "0.0.22",
"description": "Node SDK for Zoho CRM",
"main": "lib/js/ZCRMRestClient",
"dependencies": {
Expand Down