From e253825da69d1be6d7bb4d0360f8c3add73516ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20S=C3=B3jko?= Date: Fri, 5 Jan 2024 12:09:34 +0100 Subject: [PATCH] fix(syncing-server): error message --- .../Syncing/CheckForTrafficAbuse/CheckForTrafficAbuse.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/syncing-server/src/Domain/UseCase/Syncing/CheckForTrafficAbuse/CheckForTrafficAbuse.ts b/packages/syncing-server/src/Domain/UseCase/Syncing/CheckForTrafficAbuse/CheckForTrafficAbuse.ts index 5c1e6d189..8a7948fde 100644 --- a/packages/syncing-server/src/Domain/UseCase/Syncing/CheckForTrafficAbuse/CheckForTrafficAbuse.ts +++ b/packages/syncing-server/src/Domain/UseCase/Syncing/CheckForTrafficAbuse/CheckForTrafficAbuse.ts @@ -36,7 +36,9 @@ export class CheckForTrafficAbuse implements UseCaseInterface { }) if (metricsSummary.sum > dto.threshold) { - return Result.fail(`Traffic abuse detected for metric: ${metricToCheck.props.name}`) + return Result.fail( + `Traffic abuse detected for metric: ${metricToCheck.props.name}. Usage ${metricsSummary.sum} is greater than threshold ${dto.threshold}`, + ) } return Result.ok(metricsSummary)