Skip to content

Commit b3725c3

Browse files
fix(ios): network log empty response body (#1273)
1 parent dbc5699 commit b3725c3

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
- Add support for Expo Router navigation tracking ([#1270](https://github.com/Instabug/Instabug-React-Native/pull/1270)).
88

9+
### Fixed
10+
11+
- Fix APM network logging on iOS when the response body is missing or empty. ([#1273](https://github.com/Instabug/Instabug-React-Native/pull/1273)).
12+
913
## [13.3.0](https://github.com/Instabug/Instabug-React-Native/compare/v13.2.0...v13.3.0) (August 4, 2024)
1014

1115
### Added

src/utils/XhrNetworkInterceptor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export default {
152152
const _response = this._response;
153153
cloneNetwork.requestBody =
154154
typeof _response === 'string' ? _response : JSON.stringify(_response);
155-
cloneNetwork.responseBody = null;
155+
cloneNetwork.responseBody = '';
156156
}
157157

158158
if (this.response) {

test/utils/XhrNetworkInterceptor.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ describe('Network Interceptor', () => {
236236
expect.objectContaining({
237237
errorDomain: 'ClientError',
238238
errorCode: 0,
239-
responseBody: null,
239+
responseBody: '',
240240
}),
241241
);
242242
});

0 commit comments

Comments
 (0)