77import com .uid2 .shared .auth .ClientKey ;
88import com .uid2 .shared .auth .Keyset ;
99import com .uid2 .shared .auth .Role ;
10+ import com .uid2 .shared .cloud .CloudStorageException ;
1011import com .uid2 .admin .auth .AdminKeyset ;
1112import com .uid2 .shared .model .ClientType ;
1213
1314import java .time .Instant ;
1415import java .util .*;
1516
17+ import org .slf4j .Logger ;
18+ import org .slf4j .LoggerFactory ;
19+
1620import static java .lang .Math .max ;
1721
1822public class KeysetManager {
@@ -21,6 +25,8 @@ public class KeysetManager {
2125 private final AdminKeysetWriter keysetStoreWriter ;
2226 private final IKeysetKeyManager keysetKeyManager ;
2327
28+ private static final Logger LOGGER = LoggerFactory .getLogger (KeysetManager .class );
29+
2430 private final boolean enableKeysets ;
2531
2632 public KeysetManager (RotatingAdminKeysetStore keysetProvider , AdminKeysetWriter keysetStoreWriter ,
@@ -165,6 +171,12 @@ public void createAdminKeysets(Map<Integer, Keyset> keysets) throws Exception{
165171 }
166172 }
167173
168- keysetStoreWriter .upload (collection , null );
174+ try {
175+ keysetStoreWriter .upload (collection , null );
176+ }
177+ catch (CloudStorageException e )
178+ {
179+ LOGGER .error ("Failed to create admin keysets" , e );
180+ }
169181 }
170182}
0 commit comments