From eb34cbc0f7524f2cd8be4817bde85c967a1ed7c1 Mon Sep 17 00:00:00 2001 From: gahusb Date: Tue, 19 May 2026 04:57:14 +0900 Subject: [PATCH] fix(music-render): raise_for_status on MusicGen MP3 download (T6 follow-up) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Code review found: non-200 response from /audio/ endpoint was silently written as MP3 body → corrupt file. Match T5 suno.py download pattern. Co-Authored-By: Claude Opus 4.7 (1M context) --- services/music-render/providers/local.py | 1 + 1 file changed, 1 insertion(+) diff --git a/services/music-render/providers/local.py b/services/music-render/providers/local.py index afc5650..196edc8 100644 --- a/services/music-render/providers/local.py +++ b/services/music-render/providers/local.py @@ -68,6 +68,7 @@ def run_local_generation(task_id: str, params: dict) -> None: file_path = os.path.join(MUSIC_MEDIA_ROOT, filename) dl = requests.get(remote_url, timeout=120, stream=True) + dl.raise_for_status() with open(file_path, "wb") as f: for chunk in dl.iter_content(chunk_size=8192): f.write(chunk)