Add condition to errors for fastly config

This commit is contained in:
Matthew Taylor 2016-05-26 19:41:03 -04:00
parent a4f15f4ec8
commit 1f25fec353

View file

@ -65,14 +65,14 @@ module.exports = function (apiKey, serviceId) {
if (err && err.statusCode === 404) { if (err && err.statusCode === 404) {
this.request('POST', postUrl, condition, function (err, response) { this.request('POST', postUrl, condition, function (err, response) {
if (err) { if (err) {
return cb('Failed while inserting condition: ' + err); return cb('Failed while inserting condition \"' + condition + '\": ' + err);
} }
return cb(null, response); return cb(null, response);
}); });
return; return;
} }
if (err) { if (err) {
return cb('Failed to update condition: ' + err); return cb('Failed to update condition \"' + condition + '\": ' + err);
} }
return cb(null, response); return cb(null, response);
}.bind(this)); }.bind(this));