node-ews
node-ews copied to clipboard
www-authenticate not found on ntlm
Hi
My program sometimes get "www-authenticate not found on response of second request" on the ewsFunction "GetItem" It happens about two times in every 10-20 times. Like get 100 items, I will get 10 error.
Dose anyone have similar issue ?
Thanks
Error: www-authenticate not found on response of second request
at sendType3Message (/Users/xxxxxxxxxxxx/node_modules/node-ews/node_modules/httpntlm/httpntlm.js:71:20)
at Immediate.<anonymous> (/Users/xxxxxxxxxxxx/node_modules/node-ews/node_modules/httpntlm/httpntlm.js:102:4)
at processImmediate (internal/timers.js:462:21)
const ewsConfig = {
username: config.useraccount,
password: config.password,
host: config.host
};
const ews = new EWS(ewsConfig);
function getCalendarItem(Id, callback) {
const ewsFunction = 'GetItem';
const ewsArgs = {
'ItemShape': {
'BaseShape': 'AllProperties',
"BodyType":'Text'
},
'ItemIds' : {
'ItemId':{
'attributes': {
'Id': Id
}
}
}
}
ews.run(ewsFunction, ewsArgs)
.then(result => {
const json = JSON.stringify(result);
callback(json);
})
.catch(err => {
console.log(err);
callback(null);
});
}