better ujs error handling