Correcao do Musicando Ideias: timeout de gateway 502, arranjo vocal/instrumental sintetizado e tratamento de erro JSON
This commit is contained in:
+5
-2
@@ -7610,11 +7610,14 @@ window.toggleCustomAudio = (btn) => {
|
||||
turmaId: musicaTurmaSelect?.value || null,
|
||||
gerarAudio: true
|
||||
})
|
||||
});
|
||||
if (!res.ok) {
|
||||
const errMsg = await safeExtractError(res, 'Erro ao compor música');
|
||||
throw new Error(errMsg);
|
||||
}
|
||||
|
||||
const data = await res.json();
|
||||
|
||||
if (res.ok && data.success) {
|
||||
if (data.success) {
|
||||
activeMusicaData = {
|
||||
titulo: data.titulo || `Música: ${tema}`,
|
||||
versaoPrincipal: data.versaoPrincipal,
|
||||
|
||||
Reference in New Issue
Block a user