Skip to content

Debugging

Terminal window
curl -s https://bufin.id/api/health
docker ps --format '{{.Names}} {{.Status}}'
  • Container: api, web, db (nama infrastructure-db-1 untuk 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.
Terminal window
docker exec -i infrastructure-db-1 psql -U bufin -d bufin < query.sql

Selalu tulis SQL ke file lalu pipe. Inline -c merusak tanda kutip kolom camelCase. Kutip setiap kolom multi-huruf besar ("occurredAt", "coupleId").

  1. Bandingkan SUM transaksi aktif vs BankAccount.balance.
  2. Cek baris soft delete (deletedAt tidak null) yang mungkin belum membalik saldo.
  3. Semua perubahan saldo harus lewat LedgerService; kalau ada update langsung, itu penyebabnya.
  1. GET /api/bots/status (butuh token).
  2. GET /api/bots/diagnostics (publik).
  3. Cek ProcessedMessage untuk pesan yang sudah diproses.