Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Commit 958e0c8

Browse files
committed
Add custom error type for ServiceError
1 parent 69277ab commit 958e0c8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

WordPressAuthenticator/Services/WordPressComBlogService.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class WordPressComBlogService {
4343

4444
let site = WordPressComSiteInfo(remote: response)
4545
guard site.url != Constants.wordPressBlogURL else {
46-
failure(WordPressOrgXMLRPCValidatorError.invalid)
46+
failure(ServiceError.invalidWordPressAddress)
4747
return
4848
}
4949
success(site)
@@ -63,5 +63,6 @@ extension WordPressComBlogService {
6363

6464
enum ServiceError: Error {
6565
case unknown
66+
case invalidWordPressAddress
6667
}
6768
}

WordPressAuthenticator/Unified Auth/View Related/Site Address/SiteAddressViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ private extension SiteAddressViewController {
552552
self?.navigationController?.pushViewController(customUI, animated: true)
553553
}
554554
} else {
555-
self.displayError(error, sourceTag: self.sourceTag)
555+
self.displayError(message: Localization.invalidURL)
556556
}
557557
})
558558
}

0 commit comments

Comments
 (0)