Skip to content

Commit d0008ae

Browse files
committed
Minor fixes for error notifier
1 parent f81190c commit d0008ae

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/misc.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,16 +219,17 @@ export function reportError(err) {
219219
v: 1,
220220
tid: 'UA-1768265-13',
221221
cid: uuid(),
222-
cd1: process.env.PLATFORMIO_CALLER,
223222
aid: 'node.helpers',
224223
av: PACKAGE_VERSION,
225224
an: `${os.type()}, ${os.release()}, ${os.arch()}`,
226225
t: 'exception',
227226
exd: err.toString(),
228227
exf: 1
229228
};
229+
if (process.env.PLATFORMIO_CALLER) {
230+
data['cd1'] = process.env.PLATFORMIO_CALLER;
231+
}
230232
request.post('https://www.google-analytics.com/collect', {
231-
body: data,
232-
json: true
233+
body: qs.stringify(data)
233234
});
234235
}

0 commit comments

Comments
 (0)