Project

General

Profile

Actions

Task #9

open

StatisticsService catches Exception and returns zeroed responses

Added by Redmine Admin about 2 hours ago.

Status:
New
Priority:
Normal
Assignee:
-
Start date:
04/27/2026
Due date:
% Done:

0%

Estimated time:

Description

Where: src/main/kotlin/com/articon/base/domain/analytics/statistics/common/services/StatisticsService.kt

  • getDeliveriesStatistics (lines 125–158)
  • getInvoicesStatistics (lines 161–185)

What's wrong: Both methods wrap their query in try { … } catch (e: Exception) { return zero-valued response }.

Why it matters: Consumers cannot distinguish "no data" from "DB connection died" / "permission denied" / "schema broke". Dashboards show plausible zeros; on-call has no signal that the data layer is unhealthy.

Suggested fix: Let the exception propagate to controller advice, or log + rethrow + return a typed Failure result so callers can react explicitly.

No data to display

Actions

Also available in: Atom PDF