1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-24 15:49:39 +02:00

feat: Save error backtrace for sync errors for better debugging (#1578)

Co-authored-by: Tony Vincent Yesudas <tony.yesudas@raisenow.com>
This commit is contained in:
Tony Vincent 2024-12-30 16:04:05 +01:00 committed by GitHub
parent 77def1db40
commit 9d217afb9f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13 additions and 2 deletions

View file

@ -34,6 +34,11 @@ class Sync < ApplicationRecord
scope.set_context("sync", { id: id })
end
update! status: :failed, error: error.message, last_ran_at: Time.current
update!(
status: :failed,
error: error.message,
error_backtrace: error.backtrace&.first(10),
last_ran_at: Time.current
)
end
end