[GH-ISSUE #3825] [Issue]: Bound and classify Giphy proxy failures #2065

Closed
opened 2026-10-21 05:45:03 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Xelvanis on GitHub (Jul 19, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3825

Summary

The Giphy proxy has no explicit outbound timeout and does not map network failures or malformed upstream responses into stable API errors.

Expected behavior

Giphy requests should stop after a bounded interval. Timeouts should return 504, while network failures, non-success responses, and invalid response bodies should return a stable 502 without exposing upstream bodies or producing unusable GIF entries.

Actual behavior

The route calls fetch without an explicit timeout. A rejected fetch can escape the route's response mapping, and response data is projected with loose any access that can emit entries with empty URLs when Giphy returns an unexpected shape.

Steps to reproduce

  1. Configure GIPHY_API_KEY in a source checkout.
  2. Exercise /api/gifs/search with the upstream connection stalled, rejected, or returning an invalid response shape.
  3. Observe that the route relies on ambient Undici timeout behavior or returns an unstable generic failure instead of a bounded, classified response.

Environment

  • Marinara Engine version: 2.3.3
  • Install type: source
  • OS + version: Windows 11 (observed; route behavior is platform-independent)
  • Browser or app shell: Chrome

Logs, screenshots, or video

Focused local route proof confirmed Undici timeout errors are promise rejections that require explicit mapping. No API key or upstream response body is included here.

Additional context

The client already has a distinct setup state for a missing Giphy key. This issue concerns requests made after a key is configured.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @Xelvanis on GitHub (Jul 19, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3825 ## Summary The Giphy proxy has no explicit outbound timeout and does not map network failures or malformed upstream responses into stable API errors. ## Expected behavior Giphy requests should stop after a bounded interval. Timeouts should return `504`, while network failures, non-success responses, and invalid response bodies should return a stable `502` without exposing upstream bodies or producing unusable GIF entries. ## Actual behavior The route calls `fetch` without an explicit timeout. A rejected fetch can escape the route's response mapping, and response data is projected with loose `any` access that can emit entries with empty URLs when Giphy returns an unexpected shape. ## Steps to reproduce 1. Configure `GIPHY_API_KEY` in a source checkout. 2. Exercise `/api/gifs/search` with the upstream connection stalled, rejected, or returning an invalid response shape. 3. Observe that the route relies on ambient Undici timeout behavior or returns an unstable generic failure instead of a bounded, classified response. ## Environment - Marinara Engine version: 2.3.3 - Install type: source - OS + version: Windows 11 (observed; route behavior is platform-independent) - Browser or app shell: Chrome ## Logs, screenshots, or video Focused local route proof confirmed Undici timeout errors are promise rejections that require explicit mapping. No API key or upstream response body is included here. ## Additional context The client already has a distinct setup state for a missing Giphy key. This issue concerns requests made after a key is configured. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:45:03 +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#2065
No description provided.