Commit 5c741dc642f875a7fbe10d1ad3e527c1225450b6

Authored by Adhidarma Hadiwinoto
1 parent 36700e1208
Exists in master

coba cari

Showing 1 changed file with 8 additions and 1 deletions Side-by-side Diff

... ... @@ -316,7 +316,14 @@ function getTaskKey(task, chipInfo) {
316 316 if (typeof task === 'string') {
317 317 requestId = task;
318 318 } else {
319   - requestId = task.requestId;
  319 + try {
  320 + requestId = task.requestId;
  321 + }
  322 + catch(e) {
  323 + logger.warn('Something wrong', {task: task});
  324 + process.exit(1);
  325 + }
  326 +
320 327 }
321 328  
322 329 if (!chipInfo && config && config.globals && config.globals.gateway_name) {