fix(server-renderer): handle errors in optimized component renders (#12601)