Remove SimpleFIN sync errors modal and related routes, methods, and logic. (#365)

- Removed the `errors` modal and its associated view.
- Eliminated references to `errors` route and controller methods.
- Consolidated error handling into the `register_error` method to improve error tracking and de-duplication.
- Enhanced logging and introduced instrumentation for better observability.

Co-authored-by: Josh Waldrep <joshua.waldrep5+github@gmail.com>
This commit is contained in:
LPW
2025-11-22 08:08:43 -05:00
committed by GitHub
parent f491916411
commit 3fe9768d72
6 changed files with 92 additions and 129 deletions

View File

@@ -18,11 +18,15 @@ module SimplefinItemsHelper
total_errors = stats["total_errors"].to_i
return nil if total_errors.zero?
sample = Array(stats["errors"]).map do |e|
# Build a small, de-duplicated sample of messages with counts
grouped = Array(stats["errors"]).map { |e|
name = (e[:name] || e["name"]).to_s
msg = (e[:message] || e["message"]).to_s
name.present? ? "#{name}: #{msg}" : msg
end.compact.first(2).join("")
text = name.present? ? "#{name}: #{msg}" : msg
text.strip
}.reject(&:blank?).tally
sample = grouped.first(2).map { |text, count| count > 1 ? "#{text} (×#{count})" : text }.join("")
buckets = stats["error_buckets"] || {}
bucket_text = if buckets.present?