Error handling search

This commit is contained in:
2025-10-22 13:52:11 +02:00
parent 4e0748302e
commit 31eeff8890

View File

@@ -261,6 +261,11 @@ for (const mentalState of mentalStates) {
authorization: `Bearer ${AUTHTOKEN}`
}
});
if (!response.ok) {
chalk.red("ERROR SEARCHING SONGS")
chalk.red(response.text());
continue;
}
const responseData = await response.json();
const data = formatAudioData(responseData.result);