Ensured that the error handler doesn't throw an error.