File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
core/src/main/java/com/google/cloud/sql/core Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -358,17 +358,21 @@ private void validateAccessToken(AccessToken accessToken) {
358358 DateTimeFormatter formatter = DateTimeFormatter .ISO_INSTANT .withZone (ZoneId .of ("UTC" ));
359359 String nowFormat = formatter .format (now );
360360 String expirationFormat = formatter .format (expirationTime );
361- throw new RuntimeException (
361+ String errorMessage =
362362 "Access Token expiration time is in the past. Now = "
363363 + nowFormat
364364 + " Expiration = "
365- + expirationFormat );
365+ + expirationFormat ;
366+ logger .warning (errorMessage );
367+ throw new RuntimeException (errorMessage );
366368 }
367369 }
368370
369371 // Is the token empty?
370372 if (tokenValue .length () == 0 ) {
371- throw new RuntimeException ("Access Token has length of zero" );
373+ String errorMessage = "Access Token has length of zero" ;
374+ logger .warning (errorMessage );
375+ throw new RuntimeException (errorMessage );
372376 }
373377 }
374378
You can’t perform that action at this time.
0 commit comments