diff --git a/src/influxdb-reporter.js b/src/influxdb-reporter.js index 55bf2fb..50d7871 100644 --- a/src/influxdb-reporter.js +++ b/src/influxdb-reporter.js @@ -93,10 +93,10 @@ class InfluxDBReporter { request_name: item.name, url: request.url.toString(), method: request.method, - status: args.response.status, - code: args.response.code, - response_time: args.response.responseTime, - response_size: args.response.responseSize, + status: args.response ? args.response.status : 'Failed', + code: args.response ? args.response.code : 0, + response_time: args.response ? args.response.responseTime : null, + response_size: args.response ? args.response.responseSize : null, test_status: 'PASS', assertions: 0, failed_count: 0,