diff --git a/bnplay-audio-api.html b/bnplay-audio-api.html
index 8c5e919..6ef6ac6 100644
--- a/bnplay-audio-api.html
+++ b/bnplay-audio-api.html
@@ -85,10 +85,16 @@
function ui_load() {
btnToggle = document.getElementById("btnToggle");
- return bnp_load().then(() => {
- btnToggle.removeAttribute("disabled");
- ui_update();
- });
+ return bnp_load()
+ .then(() => {
+ btnToggle.removeAttribute("disabled");
+ ui_update();
+ })
+ .catch((error) => {
+ console.log(error);
+ divStatus.innerHTML = error;
+ btnToggle.value = "ERROR";
+ });
}
function ui_update() {