Skip to content

Commit 4d6b6bd

Browse files
committed
Minor bug fix in the logs on update
1 parent 63c4b2e commit 4d6b6bd

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

dist/field.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ var Field = function (_Base) {
244244
json: json
245245
}, function (err, resp, body) {
246246
if (err || resp.statusCode !== 200) {
247-
_this4.log(('Field update error to ' + _this4.opts.fieldHostname + ':').red, err.code);
247+
_this4.log(('Field update error to ' + _this4.opts.fieldHostname + ':').red, resp && resp.statusCode, err && err.code);
248248
}
249249
//this.log('Update response:', body);
250250
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "field.cli",
3-
"version": "0.0.9",
3+
"version": "0.0.10",
44
"description": "CarrIOTA FIeld Client",
55
"main": "dist/field.js",
66
"homepage": "https://semkodev.com",

src/field.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ class Field extends Base {
200200
json
201201
}, (err, resp, body) => {
202202
if (err || resp.statusCode !== 200) {
203-
this.log(`Field update error to ${this.opts.fieldHostname}:`.red, err.code);
203+
this.log(`Field update error to ${this.opts.fieldHostname}:`.red, resp && resp.statusCode, err && err.code);
204204
}
205205
//this.log('Update response:', body);
206206
})

0 commit comments

Comments
 (0)