trypost/app/Services
Paulo Castellano 3bc481ac07 Make LogoAttacher honor its swallow-all contract; drop the caller try/catch
LogoAttacher::attach promised in its docblock that any failure — including a
persistence error — is logged and swallowed so the caller need not handle it.
But the persistence block was try/finally with no catch, so a Throwable from
clearMediaCollection/addMediaFromPath escaped. Both call sites (store and
updateSettings) each wrapped the call in an identical try/catch + Log::warning
to compensate — a band-aid duplicated across the controller.

Fix it at the root: the persistence block now catches Throwable, logs it, and
returns false, matching the documented contract. Both controller call sites
collapse to a single attach() line, and the now-unused Log/Throwable imports
are dropped.

Adds LogoAttacherTest covering the success path, the swallowed persistence
failure, a failed fetch, and a rejected mime type.
2026-07-03 20:15:37 -03:00
..
Ai Centralize supported content languages in a ContentLanguage enum 2026-07-03 14:12:25 -03:00
Automation fix(automations): return null on any feed parse failure 2026-06-16 12:09:16 -03:00
Brand Make LogoAttacher honor its swallow-all contract; drop the caller try/catch 2026-07-03 20:15:37 -03:00
Image fix(tweet-card): vertically center the name + handle block against the avatar 2026-06-17 20:24:44 -03:00
Media fix(tiktok): resize oversized photos before PULL_FROM_URL 2026-06-26 12:23:56 -03:00
Post fix(media): treat any download failure (timeout/DNS/refused) as a failed fetch 2026-06-29 13:41:47 -03:00
PostTemplate refactor: reorganize settings UI, migrate post templates to a file-based registry, and remove legacy video generation features 2026-05-03 13:44:13 -03:00
Social Replace generic token-TTL constant with per-platform Platform::defaultTokenTtlSeconds() 2026-07-03 13:11:36 -03:00
GiphyService.php fix(media): don't 500 when the Unsplash/Giphy key is set to null 2026-07-01 12:16:15 -03:00
PostHogService.php chore: drop verbose docblocks across PostHog and billing files 2026-05-07 16:03:12 -03:00
UnsplashService.php fix(media): don't 500 when the Unsplash/Giphy key is set to null 2026-07-01 12:16:15 -03:00