Skip to content

Add unified app_logs error logging across client and functions#1

Merged
ClementLSW merged 2 commits into
mainfrom
copilot/add-app-logs-migration
May 26, 2026
Merged

Add unified app_logs error logging across client and functions#1
ClementLSW merged 2 commits into
mainfrom
copilot/add-app-logs-migration

Conversation

Copilot AI commented May 26, 2026

Copy link
Copy Markdown
Contributor

Introduce a single app_logs table to capture OCR, FX, expense save, invite, and auth failures from both the client (JWT) and Netlify functions (service role), while preventing client reads. Logging is fire‑and‑forget so user flows never block on telemetry.

  • Database: add app_logs migration with RLS insert policy, no‑read policy, and indexes for event/time queries.
  • Client logging: add src/lib/logger.js and wire FX failures, expense save failures (expense/splits), and auth init/profile/invite-claim errors.
  • Functions logging: add shared writeLog helper; log OCR success/error (with raw snippets on parse failures) and invite flow errors.

Example:

await log('fx.error', {
  from: expenseCurrency,
  to: group?.currency || 'SGD',
  date: expenseDate,
  is_historical: isHistorical,
  http_status: err.status ?? null,
  error: err.message,
})

Copilot AI and others added 2 commits May 26, 2026 15:13
@netlify

netlify Bot commented May 26, 2026

Copy link
Copy Markdown

Deploy Preview for omoneypmoney ready!

Name Link
🔨 Latest commit 678a918
🔍 Latest deploy log https://app.netlify.com/projects/omoneypmoney/deploys/6a15b978acdcaf0008995845
😎 Deploy Preview https://deploy-preview-1--omoneypmoney.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ClementLSW ClementLSW requested a review from Copilot May 26, 2026 15:17
@ClementLSW ClementLSW marked this pull request as ready for review May 26, 2026 15:18
@ClementLSW ClementLSW review requested due to automatic review settings May 26, 2026 15:19
@ClementLSW ClementLSW merged commit 28c1357 into main May 26, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants