spot refactor network parsing?
This commit is contained in:
parent
521b04bf14
commit
a2a1459e8f
1 changed files with 11 additions and 1 deletions
|
|
@ -165,7 +165,17 @@ export function createSpotNetworkRequest(
|
|||
: 0;
|
||||
|
||||
const status = getRequestStatus(trackedRequest);
|
||||
const body = trackedRequest.reqBody ? filterBody(trackedRequest.reqBody) : "";
|
||||
let body;
|
||||
if (trackedRequest.reqBody) {
|
||||
try {
|
||||
body = filterBody(trackedRequest.reqBody)
|
||||
} catch (e) {
|
||||
body = "Error parsing body";
|
||||
console.error(e)
|
||||
}
|
||||
} else {
|
||||
body = "";
|
||||
}
|
||||
const request: SpotNetworkRequest = {
|
||||
method: trackedRequest.method,
|
||||
type,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue