in action/lib/common.js [48:69]
function verifyTriggerAuth(triggerURL, auth, rejectNotFound) {
var options = {
method: 'GET',
url: triggerURL,
rejectUnauthorized: false,
headers: {
'Content-Type': 'application/json',
'User-Agent': 'whisk'
},
auth: auth
};
return request(options)
.catch(err => {
if (err.statusCode && err.statusCode === 404 && !rejectNotFound) {
return Promise.resolve()
} else {
console.log(`Trigger auth error: ${JSON.stringify(err)}`);
return Promise.reject({ authError: 'You are not authorized for this trigger.'});
}
});
}