Skip to content

Commit

Permalink
Fix an issue with MediaCoordinator not reporting import errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kean committed Aug 24, 2023
1 parent 0376ca1 commit 13285a3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions WordPress/Classes/Services/MediaImportService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,11 @@ class MediaImportService: NSObject {
thumbnailCallback?(media, url)
}
}

completion(transformed)
if let error {
completion(.failure(error)) // Import failed
} else {
completion(transformed)
}
}, on: .main)
}

Expand Down

0 comments on commit 13285a3

Please sign in to comment.