mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-07 14:35:23 +02:00
Implement error handling and logging for sparkline and series methods
- Added rescue blocks to handle exceptions in the Accounts and AccountableSparklines controllers, logging errors and rendering error partials. - Enhanced error handling in the Account::Chartable and Balance::ChartSeriesBuilder models, logging specific error messages for series generation failures. - Updated the accounts view to include a timeout for Turbo frame loading. - Added a test to ensure graceful handling of sparkline errors in the AccountsController. In reference to bug #2315
This commit is contained in:
parent
3cc88f3e98
commit
6f67827f14
9 changed files with 113 additions and 8 deletions
8
app/views/accountable_sparklines/_error.html.erb
Normal file
8
app/views/accountable_sparklines/_error.html.erb
Normal file
|
@ -0,0 +1,8 @@
|
|||
<%= turbo_frame_tag "#{params[:accountable_type]}_sparkline" do %>
|
||||
<div class="flex items-center justify-end gap-1">
|
||||
<div class="w-8 h-3 flex items-center justify-center">
|
||||
<%= icon("alert-triangle", size: "sm", class: "text-warning") %>
|
||||
</div>
|
||||
<p class="font-mono text-right text-xs text-warning">Error</p>
|
||||
</div>
|
||||
<% end %>
|
Loading…
Add table
Add a link
Reference in a new issue