trails/apps/journal/app
Ullrich Schäfer edd2cabf12
DRY up ZodError → FieldError mapping
Five journal API route handlers had the same inline lambda:

    parsed.error.issues.map((i) => ({
      field: i.path.join("."),
      message: i.message,
    }))

Pull it into `zodIssuesToFieldErrors(error)` next to FieldError in
`@trails-cool/api/errors.ts` and re-export it so all five handlers
share the same implementation. The path-flattening rule now lives in
one place, and new routes get it for free.

Public error-response shape is unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 11:45:09 +02:00
..
components Stop Sentry on logout; fix E2E + Dockerfile for merged consolidation 2026-04-18 00:40:36 +02:00
jobs Fix demo-bot cron + cadence math 2026-04-19 11:25:06 +02:00
lib Modernise zod idioms to v4 2026-04-19 11:41:03 +02:00
routes DRY up ZodError → FieldError mapping 2026-04-19 11:45:09 +02:00
entry.client.tsx Add legal pages, ToS acceptance, and alpha banner 2026-04-18 00:08:48 +02:00
entry.server.tsx Consolidate Sentry config into shared package; fix inconsistencies 2026-04-18 00:30:09 +02:00
root.tsx Prompt users with stale terms_version to re-accept 2026-04-19 08:06:16 +02:00
routes.ts Prompt users with stale terms_version to re-accept 2026-04-19 08:06:16 +02:00