From 03dc6c7a9c5373c852c2e1f37a2adf5587c8b5aa Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Tue, 24 May 2022 13:41:27 +0200 Subject: [PATCH] Log unexpected kredits API errors --- app/controllers/api/kredits_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/api/kredits_controller.rb b/app/controllers/api/kredits_controller.rb index 3b8768f..e54993d 100644 --- a/app/controllers/api/kredits_controller.rb +++ b/app/controllers/api/kredits_controller.rb @@ -4,7 +4,8 @@ class Api::KreditsController < Api::BaseController btcpay = BtcPay.new balance = btcpay.onchain_wallet_balance render json: balance - rescue + rescue => error + Rails.logger.warn "Failed to fetch kredits BTC wallet balance: #{error.message}" render json: { error: 'Failed to fetch wallet balance' }, status: 500 end