Skip to content

Commit 63335b1

Browse files
Merge pull request #533 from Instabug/fix/network-logger-defensive-coding
Fix/network logger defensive coding
2 parents ff8b588 + a7b55c0 commit 63335b1

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## master
22

3+
* Fixes a crash caused by the network logger when the object passed is too large
34
* Adds source map upload script support for environment variables use inside Info.plist
45

56
## v9.1.9 (2020-10-01)

modules/NetworkLogger.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,14 @@ export default {
2929
network
3030
);
3131
} else {
32-
if (Platform.OS === 'android') {
33-
Instabug.networkLog(JSON.stringify(network));
34-
} else {
35-
Instabug.networkLog(network);
32+
try {
33+
if (Platform.OS === 'android') {
34+
Instabug.networkLog(JSON.stringify(network));
35+
} else {
36+
Instabug.networkLog(network);
37+
}
38+
} catch (e) {
39+
console.error(e);
3640
}
3741
}
3842
}

0 commit comments

Comments
 (0)