Skip to content

Commit

Permalink
Update extensions/data-transfer/portability-data-transfer-google/src/…
Browse files Browse the repository at this point in the history
…main/java/org/datatransferproject/datatransfer/google/photos/GooglePhotosInterface.java


actually `maybeRethrowFileMismatchError` (and consider moving somewhere common if this isn't specific to Photos APIs)
  • Loading branch information
jzacsh committed Aug 26, 2022
1 parent e784fa2 commit 0efdfec
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ <T> T makePostRequest(String url, Optional<Map<String, String>> parameters,
*
* Note that making this a separate method to avoid polluting throw lists.
*/
private void handleUploadException(HttpResponseException e) throws UploadErrorException {
private void maybeRethrowAsUploadError(HttpResponseException e) throws UploadErrorException {
if (e.getStatusCode() == 400 && e.getContent()
.contains("Checksum from header does not match received payload content.")) {
throw new UploadErrorException("Hash mismatch", e);
Expand Down

0 comments on commit 0efdfec

Please sign in to comment.