Skip to content

Commit

Permalink
fix: error handling on telemetry call (#344)
Browse files Browse the repository at this point in the history
* fix: exception handling on telemetry

* 1.15.5
  • Loading branch information
aliemir authored May 22, 2023
1 parent 2fcda1d commit fa1386f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "superplate-cli",
"version": "1.15.4",
"version": "1.15.5",
"description": "The frontend boilerplate with superpowers",
"license": "MIT",
"repository": {
Expand Down
20 changes: 12 additions & 8 deletions src/saofile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,14 +329,18 @@ const saoConfig: GeneratorConfig = {
const { telemetry } = await prompt_telemetry();

if (telemetry === "yes") {
analytics.track({
event: "generate",
properties: {
...sao.answers,
type: sao.opts.extras.projectType,
},
anonymousId: uuidv4(),
});
try {
analytics.track({
event: "generate",
properties: {
...sao.answers,
type: sao.opts.extras.projectType,
},
anonymousId: uuidv4(),
});
} catch (error) {
//
}
}
}

Expand Down

0 comments on commit fa1386f

Please sign in to comment.