Skip to content

Commit 6838cdd

Browse files
committed
Add throwOnError
1 parent 77ff6c6 commit 6838cdd

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.changeset/spotty-flowers-work.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@teslemetry/api": patch
3+
---
4+
5+
Add throwOnError option but default to true.

packages/api/src/Teslemetry.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ interface TeslemetryOptions {
1717
region?: "na" | "eu";
1818
logger?: Logger;
1919
stream?: TeslemetryStreamOptions;
20+
throwOnError?: boolean;
2021
}
2122

2223
export class Teslemetry {
@@ -43,6 +44,7 @@ export class Teslemetry {
4344
headers: {
4445
"X-Library": `typescript teslemetry ${pkg.version}`,
4546
},
47+
throwOnError: options?.throwOnError ?? true,
4648
});
4749

4850
// Log requests and update region

0 commit comments

Comments
 (0)