long-overdue sanitizing of error messages, to help catch fatal errors that don't parse to JSON