Debugging
Cek cepat
Section titled “Cek cepat”curl -s https://bufin.id/api/healthdocker ps --format '{{.Names}} {{.Status}}'- Container:
api,web,db(namainfrastructure-db-1untuk DB). - Log:
docker logs --tail 200 infrastructure-api-1. - Port lokal: API
127.0.0.1:3006/api, container API:3001, web nginx:3005, db:5445.
Database
Section titled “Database”docker exec -i infrastructure-db-1 psql -U bufin -d bufin < query.sqlSelalu tulis SQL ke file lalu pipe. Inline -c merusak tanda kutip kolom camelCase. Kutip setiap kolom multi-huruf besar ("occurredAt", "coupleId").
Saldo tidak sesuai
Section titled “Saldo tidak sesuai”- Bandingkan
SUMtransaksi aktif vsBankAccount.balance. - Cek baris soft delete (
deletedAttidak null) yang mungkin belum membalik saldo. - Semua perubahan saldo harus lewat
LedgerService; kalau ada update langsung, itu penyebabnya.
Bot tidak membalas
Section titled “Bot tidak membalas”GET /api/bots/status(butuh token).GET /api/bots/diagnostics(publik).- Cek
ProcessedMessageuntuk pesan yang sudah diproses.