Skip to content

Commit

Permalink
chore: enable labels for api calls
Browse files Browse the repository at this point in the history
  • Loading branch information
Sai Sankeerth committed Jun 18, 2024
1 parent abeb9e7 commit 6ce30f0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/adapters/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const https = require('https');
const axios = require('axios');
const log = require('../logger');
const stats = require('../util/stats');
const { removeUndefinedValues } = require('../v0/util');
const { removeUndefinedValues, getErrorStatusCode } = require('../v0/util');
const { processAxiosResponse } = require('./utils/networkUtils');
// Only for tests
const { setResponsesForMockAxiosAdapter } = require('../../test/testHelper');
Expand Down Expand Up @@ -83,7 +83,9 @@ const fireHTTPStats = (clientResponse, startTime, statTags) => {
const endpointPath = statTags.endpointPath ? statTags.endpointPath : '';
const requestMethod = statTags.requestMethod ? statTags.requestMethod : '';
const module = statTags.module ? statTags.module : '';
const statusCode = clientResponse.success ? clientResponse.response.status : '';
const statusCode = clientResponse.success
? clientResponse.response.status
: getErrorStatusCode(clientResponse.response);
const defArgs = {
destType,
endpointPath,
Expand Down

0 comments on commit 6ce30f0

Please sign in to comment.