Skip to content

Commit e3e14d9

Browse files
authored
Merge pull request #278 from Instabug/NetworkLog-responce-code-fix
2 parents 4a17a2a + 17db918 commit e3e14d9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "instabug-reactnative",
3-
"version": "8.2.6",
3+
"version": "8.2.7",
44
"description": "React Native plugin for integrating the Instabug SDK",
55
"main": "index.js",
66
"types": "index.d.ts",

utils/XhrNetworkInterceptor.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ const XHRInterceptor = {
8181
}
8282
if (this.readyState === this.DONE) {
8383
duration = (Date.now() - duration);
84-
network.responseCode = this.status;
84+
if (this.status == null) {
85+
network.responseCode = 0;
86+
} else {
87+
network.responseCode = this.status;
88+
}
8589
network.duration = duration;
8690

8791
if (this.response) {

0 commit comments

Comments
 (0)