From 971363ded5ba01a37be0c094c221099b64a9619c Mon Sep 17 00:00:00 2001 From: Inkcha Date: Mon, 27 Jul 2026 19:43:07 -0400 Subject: [PATCH] fix: log CoinPay payment errors instead of silent failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit getCoinpayPayment() and createPayment() silently swallowed all errors and returned null. This made payment failures invisible — a temporary CoinPay API outage would silently deny users their paid entitlements with no alert. Added console.error logging so operational issues are visible. --- apps/web/lib/coinpay.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/web/lib/coinpay.ts b/apps/web/lib/coinpay.ts index 8dca2fe..c0bef16 100644 --- a/apps/web/lib/coinpay.ts +++ b/apps/web/lib/coinpay.ts @@ -46,6 +46,7 @@ export async function createCoinpayPayment(args: { } return { ok: true, payment: data.payment }; } catch (err) { + console.error(`[coinpay] create payment failed:`, (err as Error).message); return { ok: false, error: (err as Error).message }; } } @@ -57,10 +58,14 @@ export async function getCoinpayPayment(id: string): Promise