Skip to content

Commit 45f3321

Browse files
fix: PR comments
1 parent dadafad commit 45f3321

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/modules/APM.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ export const startExecutionTrace = async (name: string): Promise<Trace> => {
6262
const id = await NativeAPM.startExecutionTrace(name, timestamp);
6363

6464
if (!id) {
65-
console.error(TRACE_NOT_STARTED_APM_NOT_ENABLED);
66-
return Promise.reject(TRACE_NOT_STARTED_APM_NOT_ENABLED);
65+
throw new Error(TRACE_NOT_STARTED_APM_NOT_ENABLED);
6766
}
6867

6968
return new Trace(id, name);

src/modules/Instabug.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ export const setReproStepsConfig = (config: ReproConfig) => {
381381
*/
382382
export const setUserAttribute = (key: string, value: string) => {
383383
if (!key || typeof key !== 'string' || typeof value !== 'string') {
384-
console.error('Invalid param, Expected String');
384+
console.error('IBG-RN: Expected key and value passed to setUserAttribute to be of type string');
385385
return;
386386
}
387387
NativeInstabug.setUserAttribute(key, value);
@@ -405,7 +405,8 @@ export const getUserAttribute = async (key: string): Promise<string | null> => {
405405
*/
406406
export const removeUserAttribute = (key: string) => {
407407
if (!key || typeof key !== 'string') {
408-
console.error('Invalid param, Expected String');
408+
console.error('IBG-RN: Expected the key passed to removeUserAttribute to be of type string');
409+
409410
return;
410411
}
411412
NativeInstabug.removeUserAttribute(key);

0 commit comments

Comments
 (0)