浏览代码

fix(syncing-server): error message

Karol Sójko 1 年之前
父节点
当前提交
e253825da6

+ 3 - 1
packages/syncing-server/src/Domain/UseCase/Syncing/CheckForTrafficAbuse/CheckForTrafficAbuse.ts

@@ -36,7 +36,9 @@ export class CheckForTrafficAbuse implements UseCaseInterface<MetricsSummary> {
     })
 
     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)