fix(syncing-server): error message

This commit is contained in:
Karol Sójko 2024-01-05 12:09:34 +01:00
parent 2bddd947ba
commit e253825da6
No known key found for this signature in database
GPG key ID: C2F813669419D05F

View file

@ -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)