24 lines
550 B
Ruby
24 lines
550 B
Ruby
###############
|
|
# Local-only exception compatibility surface.
|
|
# The optional user/account arguments remain accepted for callsite compatibility,
|
|
# but are intentionally not retained, serialized, or sent anywhere.
|
|
############
|
|
|
|
class ChatwootExceptionTracker
|
|
def initialize(exception, user: nil, account: nil)
|
|
@exception = exception
|
|
discard_optional_context(user)
|
|
discard_optional_context(account)
|
|
end
|
|
|
|
def capture_exception
|
|
Rails.logger.error @exception
|
|
end
|
|
|
|
private
|
|
|
|
def discard_optional_context(_value)
|
|
nil
|
|
end
|
|
end
|