trails/packages
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
..
api DRY up ZodError → FieldError mapping 2026-04-19 11:45:09 +02:00
db Apply demo-activity-bot: Bruno, the synthetic public-walk generator 2026-04-19 10:14:58 +02:00
gpx Standardize monorepo pipeline: test, lint, typecheck across all workspaces 2026-04-13 00:00:43 +02:00
i18n Apply demo-activity-bot: Bruno, the synthetic public-walk generator 2026-04-19 10:14:58 +02:00
jobs Fix pg-boss queue creation before work registration 2026-04-14 09:08:19 +02:00
map Add tests to all packages, remove passWithNoTests 2026-04-13 00:48:27 +02:00
map-core Add tests to all packages, remove passWithNoTests 2026-04-13 00:48:27 +02:00
sentry-config Fix sentry-config typecheck: explicit types: [node] in tsconfig 2026-04-18 00:43:48 +02:00
types Standardize monorepo pipeline: test, lint, typecheck across all workspaces 2026-04-13 00:00:43 +02:00
ui Add tests to all packages, remove passWithNoTests 2026-04-13 00:48:27 +02:00