Skip to content

Commit

Permalink
Rename UploadError to EventLoggingFileUploadError
Browse files Browse the repository at this point in the history
  • Loading branch information
jkmassel committed Mar 25, 2020
1 parent b3ce8fe commit 4435485
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class EventLoggingUploadManager {
}

guard let fileContents = FileManager.default.contents(atUrl: log.url) else {
delegate.uploadFailed(withError: UploadError.fileMissing, forLog: log)
delegate.uploadFailed(withError: EventLoggingFileUploadError.fileMissing, forLog: log)
return
}

Expand Down
2 changes: 1 addition & 1 deletion Automattic-Tracks-iOS/Model/UploadError.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Foundation

public enum UploadError: Error, LocalizedError {
public enum EventLoggingFileUploadError: Error, LocalizedError {
case httpError(String)
case fileMissing

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ open class EventLoggingNetworkService {
/// Generate a reasonable error message based on the HTTP status
if !(200 ... 299).contains(statusCode) {
let errorMessage = HTTPURLResponse.localizedString(forStatusCode: statusCode)
completion(.failure(UploadError.httpError(errorMessage)))
completion(.failure(EventLoggingFileUploadError.httpError(errorMessage)))
return
}

Expand Down

0 comments on commit 4435485

Please sign in to comment.