I don’t think an alert is nice here: either use the console, or if you want to show a user error, insert a Bootstrap error at the top of the page.