Skip to content

Commit de733f9

Browse files
authored
refactor: clarify Google Photos token-refresh heuristic (#1444)
refactor: clarify Google Photos token-refresh heuristic (similar to recent Microsoft HTTP refactoring).
1 parent 1994bcf commit de733f9

File tree

1 file changed

+2
-2
lines changed
  • extensions/data-transfer/portability-data-transfer-google/src/main/java/org/datatransferproject/datatransfer/google/photos

1 file changed

+2
-2
lines changed

extensions/data-transfer/portability-data-transfer-google/src/main/java/org/datatransferproject/datatransfer/google/photos/GooglePhotosInterface.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,11 +279,11 @@ private HttpResponse handleHttpResponseException(
279279
final int statusCode = e.getStatusCode();
280280

281281
if (statusCode == 401) {
282-
monitor.info(() -> "Attempting to refresh authorization token");
282+
monitor.info(() -> String.format("GooglePhotosInterface: Attempting to refresh authorization token due to HTTP response code=%s, %s\n", statusCode, e));
283283
// if the credential refresh failed, let the error bubble up via the IOException that gets
284284
// thrown
285285
credential = credentialFactory.refreshCredential(credential);
286-
monitor.info(() -> "Refreshed authorization token successfully");
286+
monitor.info(() -> "GooglePhotosInterface: Refreshed authorization token successfully");
287287

288288
// if the second attempt throws an error, then something else is wrong, and we bubble up the
289289
// response errors

0 commit comments

Comments
 (0)