errorThrown as var instead of string in admin.js