Save Javascript errors in watchdog