@tramvai/module-metrics 2.22.0 → 2.24.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/server.es.js CHANGED
@@ -374,15 +374,15 @@ InstantMetricsModule = __decorate([
374
374
  },
375
375
  },
376
376
  },
377
- async handler({ req: { params: { metric }, body, }, res, }) {
377
+ async handler({ params: { metric }, body, responseManager }) {
378
378
  if (!instantMetricsMap[metric]) {
379
379
  log.error({
380
380
  event: 'client-instant-metric-mismatch',
381
381
  metricName: metric,
382
382
  error: new Error(`No instant metric instance found with name: ${metric}`),
383
383
  });
384
- res.status(404);
385
- res.json({
384
+ responseManager.setStatus(404);
385
+ responseManager.setBody({
386
386
  resultCode: 'NOT_FOUND',
387
387
  errorMessage: 'metric not found',
388
388
  });
package/lib/server.js CHANGED
@@ -387,15 +387,15 @@ InstantMetricsModule = tslib.__decorate([
387
387
  },
388
388
  },
389
389
  },
390
- async handler({ req: { params: { metric }, body, }, res, }) {
390
+ async handler({ params: { metric }, body, responseManager }) {
391
391
  if (!instantMetricsMap[metric]) {
392
392
  log.error({
393
393
  event: 'client-instant-metric-mismatch',
394
394
  metricName: metric,
395
395
  error: new Error(`No instant metric instance found with name: ${metric}`),
396
396
  });
397
- res.status(404);
398
- res.json({
397
+ responseManager.setStatus(404);
398
+ responseManager.setBody({
399
399
  resultCode: 'NOT_FOUND',
400
400
  errorMessage: 'metric not found',
401
401
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/module-metrics",
3
- "version": "2.22.0",
3
+ "version": "2.24.3",
4
4
  "description": "",
5
5
  "browser": "lib/browser.js",
6
6
  "main": "lib/server.js",
@@ -19,15 +19,15 @@
19
19
  "build-for-publish": "true"
20
20
  },
21
21
  "dependencies": {
22
- "@tramvai/core": "2.22.0",
23
- "@tramvai/tokens-server": "2.22.0",
24
- "@tramvai/tokens-server-private": "2.22.0",
25
- "@tramvai/tokens-metrics": "2.22.0",
26
- "@tramvai/tokens-router": "2.22.0",
27
- "@tramvai/module-common": "2.22.0",
28
- "@tramvai/tokens-http-client": "2.22.0",
29
- "@tramvai/state": "2.22.0",
30
- "@tramvai/papi": "2.22.0",
22
+ "@tramvai/core": "2.24.3",
23
+ "@tramvai/tokens-server": "2.24.3",
24
+ "@tramvai/tokens-server-private": "2.24.3",
25
+ "@tramvai/tokens-metrics": "2.24.3",
26
+ "@tramvai/tokens-router": "2.24.3",
27
+ "@tramvai/module-common": "2.24.3",
28
+ "@tramvai/tokens-http-client": "2.24.3",
29
+ "@tramvai/state": "2.24.3",
30
+ "@tramvai/papi": "2.24.3",
31
31
  "@tinkoff/measure-fastify-requests": "0.1.2",
32
32
  "@tinkoff/monkeypatch": "2.0.2",
33
33
  "@tinkoff/url": "0.8.2",