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

@@ -57,7 +57,6 @@
<% if tooltip_text.present? %>
<%= render DS::Tooltip.new(text: tooltip_text, icon: "alert-octagon", size: "sm", color: "warning") %>
<% end %>
<%= render DS::Link.new(text: "View errors", icon: "alert-octagon", variant: "secondary", href: errors_simplefin_item_path(simplefin_item), frame: "modal") %>
<% end %>
<% if stats["total_accounts"].to_i > 0 %>

View File

@@ -1,29 +0,0 @@
<%# Modal: Show SimpleFIN sync errors for a connection %>
<%= turbo_frame_tag "modal" do %>
<%= render DS::Dialog.new do |dialog| %>
<% dialog.with_header(title: "SimpleFIN sync errors") %>
<% dialog.with_body do %>
<% if @errors.present? %>
<div class="p-2 text-sm text-secondary space-y-2">
<p>We found the following errors in the latest sync:</p>
<ul class="list-disc list-inside space-y-1">
<% @errors.each do |msg| %>
<li class="text-primary"><%= msg %></li>
<% end %>
</ul>
</div>
<% else %>
<div class="p-4 text-sm text-secondary">
<p>No errors were recorded for the latest sync.</p>
</div>
<% end %>
<% end %>
<% dialog.with_footer do %>
<div class="flex items-center justify-end gap-2">
<%= render DS::Link.new(text: "Close", variant: :secondary, href: accounts_path, data: { turbo_frame: "_top" }) %>
</div>
<% end %>
<% end %>
<% end %>