How to report JavaScript errors in the admin panel

You could probably make use of WP built-in notices and create one using JavaScript.

jQuery(function($){
  $('.wrap > h1').after('<div class="error notice"><p>' + 'Your error message' + '</p></div>');
});