Log unexpected kredits API errors
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
Basti 2022-05-24 13:41:27 +02:00
parent 897b5bf4ea
commit 03dc6c7a9c
Signed by untrusted user: basti
GPG Key ID: 9F88009D31D99C72

View File

@ -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