Skip to content
This repository was archived by the owner on Mar 14, 2020. It is now read-only.

Commit fb8c538

Browse files
authored
chore: update example code (#13)
* chore: update example code
1 parent eabcbba commit fb8c538

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ exports.handler = function (event, context, callback) {
2727
// Do something with the html report
2828
return chrome.kill().then(() => callback(null))
2929
})
30+
.catch((error) => {
31+
// Handle errors when running Lighthouse
32+
return chrome.kill().then(() => callback(error))
33+
})
3034
})
35+
// Handle other errors
3136
.catch(callback)
3237
}
3338
```

test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ exports.handler = function (event, context, callback) {
1515
}
1616
return chrome.kill().then(() => callback(null, results.userAgent))
1717
})
18+
.catch((error) => {
19+
return chrome.kill().then(() => callback(error))
20+
})
1821
})
1922
.catch(callback)
2023
}

0 commit comments

Comments
 (0)