[PR #530] [MERGED] Log TTS provider request failures #4657

Closed
opened 2026-10-22 04:09:33 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/530
Author: @cha1latte
Created: 5/7/2026
Status: ✅ Merged
Merged: 5/7/2026
Merged by: @cha1latte

Base: main ← Head: fix/issue-524-tts-diagnostics-fastlane


📝 Commits (2)

  • bd1d941 Log TTS provider request failures
  • 1334eb6 Use error log level for TTS request failures

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 packages/server/src/routes/tts.routes.ts (+1 -0)

📄 Description

Linked issue

Closes #524

Why this change

  • Adding or previewing TTS can return 502 TTS provider unreachable when the configured provider request fails before a provider response is available.
  • Docker/server logs previously only showed the completed 502 request, which left operators without the sanitized provider/safeFetch failure reason needed to debug local URL blocking, DNS failures, refused connections, or timeouts.

What changed

  • Log caught /api/tts/speak provider request failures through the request logger before returning the existing 502 response.
  • Keep the client response shape unchanged.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Machine verification: pnpm --dir packages/server exec tsx scratch/issue-524-tts-diagnostics-repro.ts reproduced the TTS 502 path with diagnosticLogCount: 0 before the fix.
  • Machine verification: EXPECT_TTS_DIAGNOSTIC_LOG=1 pnpm --dir packages/server exec tsx scratch/issue-524-tts-diagnostics-repro.ts passed after the fix with diagnosticLogCount: 1.
  • Baseline validation: pnpm check passed locally.
  • Container validation: covered by GitHub container-build-test, which passed.
  • App click-through: not applicable; this is a backend logging/diagnostics fix with no user-visible UI state change.
  • Edge cases: the relevant provider failure/error path was covered by the scratch repro; light/dark/mobile/empty-state UI checks are not applicable to this backend-only change.
  • No human-only verification is required for the core claim. This is a backend logging/diagnostics fix with no UI state change.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

N/A - backend diagnostics/logging fix only.

Summary by CodeRabbit

  • Bug Fixes
    • Text-to-Speech service now delivers appropriate error messages when the provider is unreachable or the request times out, with improved diagnostic logging.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/530 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/7/2026 **Status:** ✅ Merged **Merged:** 5/7/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `main` ← **Head:** `fix/issue-524-tts-diagnostics-fastlane` --- ### 📝 Commits (2) - [`bd1d941`](https://github.com/Pasta-Devs/Marinara-Engine/commit/bd1d941c9bf82b072df66f70c2417a0d5cb35113) Log TTS provider request failures - [`1334eb6`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1334eb6c9c592eb7f76bc72a94334fb441b4541d) Use error log level for TTS request failures ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/server/src/routes/tts.routes.ts` (+1 -0) </details> ### 📄 Description ## Linked issue Closes #524 ## Why this change - Adding or previewing TTS can return `502 TTS provider unreachable` when the configured provider request fails before a provider response is available. - Docker/server logs previously only showed the completed 502 request, which left operators without the sanitized provider/safeFetch failure reason needed to debug local URL blocking, DNS failures, refused connections, or timeouts. ## What changed - Log caught `/api/tts/speak` provider request failures through the request logger before returning the existing 502 response. - Keep the client response shape unchanged. ## Validation - [x] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Machine verification: `pnpm --dir packages/server exec tsx scratch/issue-524-tts-diagnostics-repro.ts` reproduced the TTS 502 path with `diagnosticLogCount: 0` before the fix. - Machine verification: `EXPECT_TTS_DIAGNOSTIC_LOG=1 pnpm --dir packages/server exec tsx scratch/issue-524-tts-diagnostics-repro.ts` passed after the fix with `diagnosticLogCount: 1`. - Baseline validation: `pnpm check` passed locally. - Container validation: covered by GitHub `container-build-test`, which passed. - App click-through: not applicable; this is a backend logging/diagnostics fix with no user-visible UI state change. - Edge cases: the relevant provider failure/error path was covered by the scratch repro; light/dark/mobile/empty-state UI checks are not applicable to this backend-only change. - No human-only verification is required for the core claim. This is a backend logging/diagnostics fix with no UI state change. ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) N/A - backend diagnostics/logging fix only. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Text-to-Speech service now delivers appropriate error messages when the provider is unreachable or the request times out, with improved diagnostic logging. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:09:33 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#4657
No description provided.