This commit is contained in:
2025-07-01 11:38:20 -04:00
parent f99142e485
commit b19b8dc22e

View File

@ -154,8 +154,13 @@ export function LyricSearchInputField(opts = {}) {
}); });
}).fail((jqXHR, textStatus, error) => { }).fail((jqXHR, textStatus, error) => {
$(spinner).addClass("hidden"); $(spinner).addClass("hidden");
let render_text = `😕 Failed to reach search endpoint (${jqXHR.status})`;
if (typeof jqXHR.responseJSON.detail !== "undefined") {
render_text += `\n${jqXHR.responseJSON.detail}`;
}
return toast.update(search_toast, { return toast.update(search_toast, {
render: `😕 Failed to reach search endpoint (${jqXHR.status})`, type: "",
render: render_text,
style: { backgroundColor: "rgba(255, 0, 0, 0.5)", color: 'inherit' }, style: { backgroundColor: "rgba(255, 0, 0, 0.5)", color: 'inherit' },
hideProgressBar: true, hideProgressBar: true,
autoClose: 5000, autoClose: 5000,