diff --git a/CHANGELOG.md b/CHANGELOG.md index fb0876b..954c711 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to Epicure are documented here. This file is mirrored in-app at `/changelog` (and in the admin dashboard) via `apps/web/lib/changelog.ts` — update both together. +## 0.51.4 — 2026-07-19 12:50 + +### Fixed +- Gitea issue creation failures now log the real network-level cause server-side (DNS/connection/timeout, not just "fetch failed") and surface a more specific message in the admin support view's tooltip. + ## 0.51.3 — 2026-07-19 12:35 ### Fixed diff --git a/apps/web/lib/changelog.ts b/apps/web/lib/changelog.ts index bbff0c7..7b04e30 100644 --- a/apps/web/lib/changelog.ts +++ b/apps/web/lib/changelog.ts @@ -1,5 +1,5 @@ // Mirrors CHANGELOG.md at the repo root — update both together. -export const APP_VERSION = "0.51.3"; +export const APP_VERSION = "0.51.4"; export type ChangelogEntry = { version: string; @@ -11,6 +11,13 @@ export type ChangelogEntry = { }; export const CHANGELOG: ChangelogEntry[] = [ + { + version: "0.51.4", + date: "2026-07-19 12:50", + fixed: [ + "Gitea issue creation failures now log the real network-level cause server-side (DNS/connection/timeout, not just \"fetch failed\") and surface a more specific message in the admin support view's tooltip.", + ], + }, { version: "0.51.3", date: "2026-07-19 12:35", diff --git a/apps/web/lib/gitea.ts b/apps/web/lib/gitea.ts index 30f2130..94f7bf5 100644 --- a/apps/web/lib/gitea.ts +++ b/apps/web/lib/gitea.ts @@ -50,6 +50,15 @@ export async function createGiteaIssue(opts: { const issue = (await res.json()) as { html_url?: string }; return { url: issue.html_url ?? null, error: issue.html_url ? null : "Gitea response had no html_url" }; } catch (err) { - return { url: null, error: err instanceof Error ? err.message : "Unknown error" }; + // A thrown fetch error (DNS failure, connection refused, timeout, TLS + // error) never reaches the res.ok branch above, so its real cause would + // otherwise be lost — err.message alone is often just "fetch failed" + // with the actual reason nested in err.cause. Log server-side with the + // full cause chain, and fold a short form into the returned message so + // it also shows up in the admin support view's tooltip, not just logs. + const cause = err instanceof Error && err.cause instanceof Error ? err.cause.message : undefined; + const message = err instanceof Error ? err.message : "Unknown error"; + console.error("[gitea] createGiteaIssue failed", { baseUrl, repo, message, cause }); + return { url: null, error: cause ? `${message}: ${cause}` : message }; } } diff --git a/apps/web/package.json b/apps/web/package.json index 6490882..c91946b 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -1,6 +1,6 @@ { "name": "@epicure/web", - "version": "0.51.3", + "version": "0.51.4", "private": true, "scripts": { "dev": "next dev", diff --git a/package.json b/package.json index 6db2db5..81de343 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "epicure", - "version": "0.51.3", + "version": "0.51.4", "private": true, "scripts": { "dev": "pnpm --filter web dev",