Log unexpected kredits API errors
This commit is contained in:
parent
897b5bf4ea
commit
03dc6c7a9c
@ -4,7 +4,8 @@ class Api::KreditsController < Api::BaseController
|
|||||||
btcpay = BtcPay.new
|
btcpay = BtcPay.new
|
||||||
balance = btcpay.onchain_wallet_balance
|
balance = btcpay.onchain_wallet_balance
|
||||||
render json: 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' },
|
render json: { error: 'Failed to fetch wallet balance' },
|
||||||
status: 500
|
status: 500
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user