Skip to content

Commit

Permalink
axios fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vsvamsi1 committed Oct 25, 2024
1 parent 46887ac commit 92f9d88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/client/src/api/Api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ axiosInstance.defaults.transformResponse = [
function (...args) {
const transformResponseAr = axios.defaults.transformResponse;

// Pick up the transformFn from the defaults and wrap it in with telemetry code
// Pick up the transformFn from axios defaults and wrap it in with telemetry code so that we can capture how long it takes parse an api response
if (Array.isArray(transformResponseAr) && transformResponseAr?.[0]) {
const transfromFn = transformResponseAr?.[0];
const resp = startAndEndSpanForFn(
"transformApiResponse",
"axios.transformApiResponse",
{ url: this.url },
() => transfromFn.call(this, ...args),
);
Expand Down

0 comments on commit 92f9d88

Please sign in to comment.