trypost/tests/Feature/Api
Paulo Castellano a63e9ea778 fix(media): treat any download failure (timeout/DNS/refused) as a failed fetch
MediaAttacher::download() only caught RuntimeException, but a connection-level
failure throws Illuminate\Http\Client\ConnectionException (extends Exception, not
RuntimeException) — e.g. a slow/unreachable proxy hitting the 20s timeout. On the
API hosting path that propagated as a 500 (not the promised 422), skipped the
batch rollback (orphaning an already-hosted item), and leaked the temp file.

Catch Throwable so any fetch failure returns null → the caller rejects cleanly
with 422 and rolls back. Also hardens the existing MCP/REST attach-from-url paths
(a timeout there now reports a failed URL instead of 500).
2026-06-29 13:41:47 -03:00
..
ApiKeyApiTest.php feat: migrate custom API token implementation to Laravel Passport for authentication and token management 2026-05-03 18:38:17 -03:00
LabelApiTest.php feat: migrate custom API token implementation to Laravel Passport for authentication and token management 2026-05-03 18:38:17 -03:00
PlatformApiTest.php feat: complete create + publish post flow via MCP and REST API 2026-05-04 08:12:28 -03:00
PostApiPlatformMetaTest.php refactor(linkedin): infer post format from media + unify account connection 2026-06-24 21:05:09 -03:00
PostApiTest.php Make AspectRatio the single source for crop math; fill test gaps 2026-06-10 15:52:41 -03:00
PostMediaApiTest.php fix(media): treat any download failure (timeout/DNS/refused) as a failed fetch 2026-06-29 13:41:47 -03:00
SignatureApiTest.php feat: migrate custom API token implementation to Laravel Passport for authentication and token management 2026-05-03 18:38:17 -03:00
SocialAccountApiTest.php feat: migrate custom API token implementation to Laravel Passport for authentication and token management 2026-05-03 18:38:17 -03:00
UploadControllerTest.php feat(media): rate-limit upload endpoint to 10 req/min/IP 2026-05-15 17:09:40 -03:00
WorkspaceApiTest.php feat: migrate custom API token implementation to Laravel Passport for authentication and token management 2026-05-03 18:38:17 -03:00