Raise JavaScript errors as Ruby exceptions in your Rails app