Skip to content

Commit

Permalink
fix(request-duration): Set response duration in failure cases
Browse files Browse the repository at this point in the history
  • Loading branch information
andremantaswow committed Jul 8, 2024
1 parent 4696d62 commit aabac2d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/plugins/spec/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,9 @@ export const executeRequest = (req) =>
err.message = "**Failed to fetch.** \n**Possible Reasons:** \n - CORS \n - Network Failure \n - URL scheme must be \"http\" or \"https\" for CORS request."
}
specActions.setResponse(req.pathName, req.method, {
error: true, err
error: true,
duration: Date.now() - startTime,
err,
})
}
)
Expand Down

0 comments on commit aabac2d

Please sign in to comment.