Skip to content

Commit 83fb206

Browse files
committed
Address comments and add changeset
1 parent 5133650 commit 83fb206

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

.changeset/modern-parents-worry.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@firebase/performance': patch
3+
'firebase': patch
4+
---
5+
6+
Throws exception when startTime or duration is not positive value in `trace.record()` API.

packages-exp/performance-exp/src/utils/errors.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ import { SERVICE, SERVICE_NAME } from '../constants';
2121
export const enum ErrorCode {
2222
TRACE_STARTED_BEFORE = 'trace started',
2323
TRACE_STOPPED_BEFORE = 'trace stopped',
24-
NONPOSITIVE_TRACE_START_TIME = '',
25-
NONPOSITIVE_TRACE_DURATION = '',
24+
NONPOSITIVE_TRACE_START_TIME = 'nonpositive trace startTime',
25+
NONPOSITIVE_TRACE_DURATION = 'nonpositive trace duration',
2626
NO_WINDOW = 'no window',
2727
NO_APP_ID = 'no app id',
2828
NO_PROJECT_ID = 'no project id',

packages/performance/src/utils/errors.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ import { SERVICE, SERVICE_NAME } from '../constants';
2121
export const enum ErrorCode {
2222
TRACE_STARTED_BEFORE = 'trace started',
2323
TRACE_STOPPED_BEFORE = 'trace stopped',
24-
NONPOSITIVE_TRACE_START_TIME = '',
25-
NONPOSITIVE_TRACE_DURATION = '',
24+
NONPOSITIVE_TRACE_START_TIME = 'nonpositive trace startTime',
25+
NONPOSITIVE_TRACE_DURATION = 'nonpositive trace duration',
2626
NO_WINDOW = 'no window',
2727
NO_APP_ID = 'no app id',
2828
NO_PROJECT_ID = 'no project id',

0 commit comments

Comments
 (0)