Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPM Prep - Use WordPressComRESTAPIInterfacing for all sync GET and POST requests in the Swift code #777

Merged
merged 35 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
2024e63
Use `WordPressComRESTAPIInterfacing` in `ActivityServiceRemote`
mokagio Apr 4, 2024
68b7e1b
Use `WordPressComRESTAPIInterfacing` in `AutomatedTransferService`
mokagio Apr 4, 2024
3acacde
Use `WordPressComRESTAPIInterfacing` in `BlogJetpackSettingsServiceRe…
mokagio Apr 4, 2024
00ea99b
Use `WordPressComRESTAPIInterfacing` in `DashboardServiceRemote`
mokagio Apr 4, 2024
5686b20
Use `WordPressComRESTAPIInterfacing` in `AtomicAuthenticationServiceR…
mokagio Apr 4, 2024
fc01a5b
Use `WordPressComRESTAPIInterfacing` in `BloggingPromptsServiceRemote`
mokagio Apr 4, 2024
a2cbce0
Use `WordPressComRESTAPIInterfacing` in `EditorServiceRemote`
mokagio Apr 4, 2024
62628a0
Use `WordPressComRESTAPIInterfacing` in `FeatureFlagRemote`
mokagio Apr 4, 2024
2873779
Use `WordPressComRESTAPIInterfacing` in `HomepageSettingsServiceRemote`
mokagio Apr 4, 2024
8d7b816
Use `WordPressComRESTAPIInterfacing` in `JetpackBackupServiceRemote`
mokagio Apr 4, 2024
1872f2f
Use `WordPressComRESTAPIInterfacing` in `JetpackCapabilitiesServiceRe…
mokagio Apr 4, 2024
d9c58df
Use `WordPressComRESTAPIInterfacing` in `JetpackScanServiceRemote`
mokagio Apr 4, 2024
ffe285d
Use `WordPressComRESTAPIInterfacing` in `JetpackServiceRemote`
mokagio Apr 4, 2024
9990bc8
Use `WordPressComRESTAPIInterfacing` in `JetpackProxyServiceRemote`
mokagio Apr 4, 2024
6363aa0
Use `WordPressComRESTAPIInterfacing` in `NotificationSettingsServiceR…
mokagio Apr 4, 2024
6e93cbd
Use `WordPressComRESTAPIInterfacing` in `NotificationSyncServiceRemote`
mokagio Apr 4, 2024
8c49c9f
Use `WordPressComRESTAPIInterfacing` in `PeopleServiceRemote`
mokagio Apr 4, 2024
0d7b95c
Use `WordPressComRESTAPIInterfacing` in `PlanServiceRemote_ApiVersion…
mokagio Apr 4, 2024
a5cb669
Use `WordPressComRESTAPIInterfacing` in `PlanServiceRemote`
mokagio Apr 4, 2024
19f086d
Use `WordPressComRESTAPIInterfacing` in `PluginServiceRemote`
mokagio Apr 4, 2024
ea2d327
Use `WordPressComRESTAPIInterfacing` in `PostServiceRemoteREST+Revisi…
mokagio Apr 4, 2024
bf66e02
Use `WordPressComRESTAPIInterfacing` in `ProductServiceRemote`
mokagio Apr 4, 2024
e812c17
Use `WordPressComRESTAPIInterfacing` in `PushAuthenticationServiceRem…
mokagio Apr 4, 2024
05efbae
Use `WordPressComRESTAPIInterfacing` in `QRLoginServiceRemote`
mokagio Apr 4, 2024
42326b3
Use `WordPressComRESTAPIInterfacing` in `ReaderPostServiceRemote`
mokagio Apr 4, 2024
ce3627a
Use `WordPressComRESTAPIInterfacing` in `ReaderSiteSearchServiceRemote`
mokagio Apr 4, 2024
3790cb7
Use `WordPressComRESTAPIInterfacing` in `ReaderTopicServiceRemote`
mokagio Apr 4, 2024
de8e0e2
Use `WordPressComRESTAPIInterfacing` in `SharingServiceRemote`
mokagio Apr 4, 2024
b6f7d63
Use `WordPressComRESTAPIInterfacing` in `SiteManagementServiceRemote`
mokagio Apr 4, 2024
2c1aea3
Use `WordPressComRESTAPIInterfacing` in `StatsServiceRemoteV2`
mokagio Apr 4, 2024
75451ba
Use `WordPressComRESTAPIInterfacing` in `TimeZoneServiceRemote`
mokagio Apr 4, 2024
8f1196b
Use `WordPressComRESTAPIInterfacing` in `TransactionsServiceRemote`
mokagio Apr 4, 2024
0285a53
Use `WordPressComRESTAPIInterfacing` in `AtomicSiteServiceRemote`
mokagio Apr 4, 2024
852e042
Use `WordPressComRESTAPIInterfacing` in `WordPressComServiceRemote`
mokagio Apr 4, 2024
cba707d
Use `WordPressComRESTAPIInterfacing` in `RemoteConfigRemote`
mokagio Apr 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/WordPressKit/Models/EditorSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public struct EditorSettings {
}

extension EditorSettings {
init(with response: AnyObject) throws {
init(with response: Any) throws {
guard let response = response as? [String: AnyObject] else {
throw NSError(domain: NSURLErrorDomain, code: NSURLErrorBadServerResponse, userInfo: nil)
}
Expand Down
23 changes: 14 additions & 9 deletions Sources/WordPressKit/Services/ActivityServiceRemote.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ open class ActivityServiceRemote: ServiceRemoteWordPressComREST {

let finalPath = self.path(forEndpoint: endpoint, withVersion: ._2_0)

wordPressComRestApi.GET(finalPath,
wordPressComRESTAPI.get(finalPath,
parameters: nil,
success: { response, _ in
do {
Expand Down Expand Up @@ -105,7 +105,7 @@ open class ActivityServiceRemote: ServiceRemoteWordPressComREST {
parameters["on"] = formatter.string(from: on) as AnyObject
}

wordPressComRestApi.GET(path,
wordPressComRESTAPI.get(path,
parameters: parameters,
success: { response, _ in
do {
Expand Down Expand Up @@ -135,7 +135,7 @@ open class ActivityServiceRemote: ServiceRemoteWordPressComREST {
let endpoint = "sites/\(siteID)/rewind"
let path = self.path(forEndpoint: endpoint, withVersion: ._2_0)

wordPressComRestApi.GET(path,
wordPressComRESTAPI.get(path,
parameters: nil,
success: { response, _ in
guard let rewindStatus = response as? [String: AnyObject] else {
Expand All @@ -154,20 +154,25 @@ open class ActivityServiceRemote: ServiceRemoteWordPressComREST {
}, failure: { error, _ in
// FIXME: A hack to support free WPCom sites and Rewind. Should be obsolote as soon as the backend
// stops returning 412's for those sites.
if error.domain == WordPressComRestApiEndpointError.errorDomain, error.code == WordPressComRestApiErrorCode.preconditionFailure.rawValue {
let status = RewindStatus(state: .unavailable)
success(status)
let nsError = error as NSError
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a blocker, but IMO it's better to avoid casting to NSError here by using pattern matching.

if let apiError = error as? WordPressAPIError<WordPressRestApiEndpointError>,
    case let .endpointError(endpointError) = apiError,
    endpointError.code == .preconditionFailure {
  // ....
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, right.

I guess you are suggesting to used the better typed error to ensure what we are handling is a legit API error. If the casting fails, we are in a edge case and should act differently.

Under that assumption, I opened #779 to address. Thanks!


guard nsError.domain == WordPressComRestApiEndpointError.errorDomain,
nsError.code == WordPressComRestApiErrorCode.preconditionFailure.rawValue else {
failure(error)
return
}
failure(error)

let status = RewindStatus(state: .unavailable)
success(status)
return
})
}

}

private extension ActivityServiceRemote {

func mapActivitiesResponse(_ response: AnyObject) throws -> ([Activity], Int) {
func mapActivitiesResponse(_ response: Any) throws -> ([Activity], Int) {

guard let json = response as? [String: AnyObject],
let totalItems = json["totalItems"] as? Int else {
Expand Down Expand Up @@ -196,7 +201,7 @@ private extension ActivityServiceRemote {
}
}

func mapActivityGroupsResponse(_ response: AnyObject) throws -> ([ActivityGroup]) {
func mapActivityGroupsResponse(_ response: Any) throws -> ([ActivityGroup]) {
guard let json = response as? [String: AnyObject],
let totalItems = json["totalItems"] as? Int, totalItems > 0 else {
return []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Foundation
public class AtomicAuthenticationServiceRemote: ServiceRemoteWordPressComREST {

public enum ResponseError: Error {
case responseIsNotADictionary(response: AnyObject)
case responseIsNotADictionary(response: Any)
case decodingFailure(response: [String: AnyObject])
case couldNotInstantiateCookie(name: String, value: String, domain: String, path: String, expires: Date)
}
Expand All @@ -16,11 +16,9 @@ public class AtomicAuthenticationServiceRemote: ServiceRemoteWordPressComREST {
let endpoint = "sites/\(siteID)/atomic-auth-proxy/read-access-cookies"
let path = self.path(forEndpoint: endpoint, withVersion: ._2_0)

wordPressComRestApi.GET(path,
wordPressComRESTAPI.get(path,
parameters: nil,
success: {
responseObject, _ in

success: { responseObject, _ in
do {
let settings = try self.cookie(from: responseObject)
success(settings)
Expand All @@ -39,7 +37,7 @@ public class AtomicAuthenticationServiceRemote: ServiceRemoteWordPressComREST {
return Date(timeIntervalSince1970: TimeInterval(expiration))
}

private func cookie(from responseObject: AnyObject) throws -> HTTPCookie {
private func cookie(from responseObject: Any) throws -> HTTPCookie {
guard let response = responseObject as? [String: AnyObject] else {
let error = ResponseError.responseIsNotADictionary(response: responseObject)
WPKitLogError("❗️Error: \(error)")
Expand Down
4 changes: 2 additions & 2 deletions Sources/WordPressKit/Services/AtomicSiteServiceRemote.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public final class AtomicSiteServiceRemote: ServiceRemoteWordPressComREST {
if let scrollID {
parameters["scroll_id"] = scrollID
}
wordPressComRestApi.GET(path, parameters: parameters as [String: AnyObject]) { responseObject, httpResponse in
wordPressComRESTAPI.get(path, parameters: parameters as [String: AnyObject]) { responseObject, httpResponse in
guard (200..<300).contains(httpResponse?.statusCode ?? 0),
let data = (responseObject as? [String: AnyObject])?["data"],
JSONSerialization.isValidJSONObject(data) else {
Expand Down Expand Up @@ -67,7 +67,7 @@ public final class AtomicSiteServiceRemote: ServiceRemoteWordPressComREST {
if let scrollID {
parameters["scroll_id"] = scrollID
}
wordPressComRestApi.GET(path, parameters: parameters as [String: AnyObject]) { responseObject, httpResponse in
wordPressComRESTAPI.get(path, parameters: parameters as [String: AnyObject]) { responseObject, httpResponse in
guard (200..<300).contains(httpResponse?.statusCode ?? 0),
let data = (responseObject as? [String: AnyObject])?["data"],
JSONSerialization.isValidJSONObject(data) else {
Expand Down
6 changes: 3 additions & 3 deletions Sources/WordPressKit/Services/AutomatedTransferService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class AutomatedTransferService: ServiceRemoteWordPressComREST {
let endpoint = "sites/\(siteID)/automated-transfers/eligibility"
let path = self.path(forEndpoint: endpoint, withVersion: ._1_1)

wordPressComRestApi.GET(path, parameters: nil, success: { (responseObject, _) in
wordPressComRESTAPI.get(path, parameters: nil, success: { (responseObject, _) in
guard let response = responseObject as? [String: AnyObject] else {
failure(.unknown)
return
Expand All @@ -53,7 +53,7 @@ public class AutomatedTransferService: ServiceRemoteWordPressComREST {
let path = self.path(forEndpoint: endpoint, withVersion: ._1_1)
let payload = ["plugin": pluginSlug] as [String: AnyObject]

wordPressComRestApi.POST(path, parameters: payload, success: { (responseObject, _) in
wordPressComRESTAPI.post(path, parameters: payload, success: { (responseObject, _) in
guard let response = responseObject as? [String: AnyObject] else {
failure(ResponseError.decodingFailure)
return
Expand All @@ -80,7 +80,7 @@ public class AutomatedTransferService: ServiceRemoteWordPressComREST {
let endpoint = "sites/\(siteID)/automated-transfers/status"
let path = self.path(forEndpoint: endpoint, withVersion: ._1_1)

wordPressComRestApi.GET(path, parameters: nil, success: { (responseObject, _) in
wordPressComRESTAPI.get(path, parameters: nil, success: { (responseObject, _) in
guard let response = responseObject as? [String: AnyObject] else {
failure(ResponseError.decodingFailure)
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ public class BlogJetpackSettingsServiceRemote: ServiceRemoteWordPressComREST {

let endpoint = "jetpack-blogs/\(siteID)/rest-api"
let path = self.path(forEndpoint: endpoint, withVersion: ._1_1)
let parameters = ["path": "/jetpack/v4/settings"]
let parameters: [String: Any] = ["path": "/jetpack/v4/settings"]

wordPressComRestApi.GET(path,
parameters: parameters as [String: AnyObject]?,
success: {
response, _ in
guard let results = response["data"] as? [String: AnyObject],
wordPressComRESTAPI.get(path,
parameters: parameters,
success: { response, _ in
guard let responseDict = response as? [String: Any],
let results = responseDict["data"] as? [String: AnyObject],
let remoteSettings = try? self.remoteJetpackSettingsFromDictionary(results) else {
failure(ResponseError.decodingFailure)
return
Expand All @@ -38,11 +38,11 @@ public class BlogJetpackSettingsServiceRemote: ServiceRemoteWordPressComREST {
let endpoint = "jetpack-blogs/\(siteID)"
let path = self.path(forEndpoint: endpoint, withVersion: ._1_1)

wordPressComRestApi.GET(path,
wordPressComRESTAPI.get(path,
parameters: nil,
success: {
response, _ in
guard let results = response["settings"] as? [String: AnyObject],
success: { response, _ in
guard let responseDict = response as? [String: Any],
let results = responseDict["settings"] as? [String: AnyObject],
let remoteMonitorSettings = try? self.remoteJetpackMonitorSettingsFromDictionary(results) else {
failure(ResponseError.decodingFailure)
return
Expand All @@ -61,11 +61,11 @@ public class BlogJetpackSettingsServiceRemote: ServiceRemoteWordPressComREST {
let endpoint = "sites/\(siteID)/jetpack/modules"
let path = self.path(forEndpoint: endpoint, withVersion: ._1_1)

wordPressComRestApi.GET(path,
wordPressComRESTAPI.get(path,
parameters: nil,
success: {
response, _ in
guard let modules = response["modules"] as? [[String: AnyObject]],
success: { response, _ in
guard let responseDict = response as? [String: Any],
let modules = responseDict["modules"] as? [[String: AnyObject]],
let remoteModulesSettings = try? self.remoteJetpackModulesSettingsFromArray(modules) else {
failure(ResponseError.decodingFailure)
return
Expand Down Expand Up @@ -94,7 +94,7 @@ public class BlogJetpackSettingsServiceRemote: ServiceRemoteWordPressComREST {
"body": jSONBody,
"json": true] as [String: AnyObject]

wordPressComRestApi.POST(path,
wordPressComRESTAPI.post(path,
parameters: parameters,
success: {
_, _ in
Expand All @@ -113,7 +113,7 @@ public class BlogJetpackSettingsServiceRemote: ServiceRemoteWordPressComREST {
let path = self.path(forEndpoint: endpoint, withVersion: ._1_1)
let parameters = dictionaryFromJetpackMonitorSettings(settings)

wordPressComRestApi.POST(path,
wordPressComRESTAPI.post(path,
parameters: parameters,
success: {
_, _ in
Expand All @@ -131,7 +131,7 @@ public class BlogJetpackSettingsServiceRemote: ServiceRemoteWordPressComREST {
let path = self.path(forEndpoint: endpoint, withVersion: ._1_1)
let parameters = [ModuleOptionKeys.active: active]

wordPressComRestApi.POST(path,
wordPressComRESTAPI.post(path,
parameters: parameters as [String: AnyObject],
success: {
_, _ in
Expand All @@ -148,7 +148,7 @@ public class BlogJetpackSettingsServiceRemote: ServiceRemoteWordPressComREST {
let endpoint = "jetpack-blogs/\(siteID)/mine/delete"
let path = self.path(forEndpoint: endpoint, withVersion: ._1_1)

wordPressComRestApi.POST(path,
wordPressComRESTAPI.post(path,
parameters: nil,
success: {
_, _ in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ open class BloggingPromptsServiceRemote: ServiceRemoteWordPressComREST {
return
}

wordPressComRestApi.POST(path, parameters: parameters) { responseObject, _ in
wordPressComRESTAPI.post(path, parameters: parameters) { responseObject, _ in
do {
let data = try JSONSerialization.data(withJSONObject: responseObject)
let response = try JSONDecoder().decode(UpdateBloggingPromptsSettingsResponse.self, from: data)
Expand Down
2 changes: 1 addition & 1 deletion Sources/WordPressKit/Services/DashboardServiceRemote.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ open class DashboardServiceRemote: ServiceRemoteWordPressComREST {
failure(error)
}

wordPressComRestApi.GET(requestUrl,
wordPressComRESTAPI.get(requestUrl,
parameters: params,
success: { response, _ in
guard let cards = response as? NSDictionary else {
Expand Down
6 changes: 3 additions & 3 deletions Sources/WordPressKit/Services/EditorServiceRemote.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public class EditorServiceRemote: ServiceRemoteWordPressComREST {
let endpoint = "sites/\(siteID)/gutenberg?platform=mobile&editor=\(editor.rawValue)"
let path = self.path(forEndpoint: endpoint, withVersion: ._2_0)

wordPressComRestApi.POST(path, parameters: nil, success: { (responseObject, _) in
wordPressComRESTAPI.post(path, parameters: nil, success: { (responseObject, _) in
do {
let settings = try EditorSettings(with: responseObject)
success(settings)
Expand All @@ -28,7 +28,7 @@ public class EditorServiceRemote: ServiceRemoteWordPressComREST {
"set_only_if_empty": setOnlyIfEmpty
] as [String: AnyObject]

wordPressComRestApi.POST(path, parameters: parameters, success: { (responseObject, _) in
wordPressComRESTAPI.post(path, parameters: parameters, success: { (responseObject, _) in
guard let response = responseObject as? [String: String] else {
if let boolResponse = responseObject as? Bool, boolResponse == false {
return failure(EditorSettings.Error.badRequest)
Expand All @@ -51,7 +51,7 @@ public class EditorServiceRemote: ServiceRemoteWordPressComREST {
let endpoint = "sites/\(siteID)/gutenberg"
let path = self.path(forEndpoint: endpoint, withVersion: ._2_0)

wordPressComRestApi.GET(path, parameters: nil, success: { (responseObject, _) in
wordPressComRESTAPI.get(path, parameters: nil, success: { (responseObject, _) in
do {
let settings = try EditorSettings(with: responseObject)
success(settings)
Expand Down
2 changes: 1 addition & 1 deletion Sources/WordPressKit/Services/FeatureFlagRemote.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ open class FeatureFlagRemote: ServiceRemoteWordPressComREST {
return
}

wordPressComRestApi.GET(path,
wordPressComRESTAPI.get(path,
parameters: dictionary,
success: { response, _ in

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class HomepageSettingsServiceRemote: ServiceRemoteWordPressComREST {
parameters[Keys.pageForPostsID] = postsPageID as AnyObject
}

wordPressComRestApi.POST(path, parameters: parameters,
wordPressComRESTAPI.post(path, parameters: parameters,
success: { _, _ in
success()
}, failure: { error, _ in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ open class JetpackBackupServiceRemote: ServiceRemoteWordPressComREST {
parameters["types"] = types.toDictionary() as AnyObject
}

wordPressComRestApi.POST(path, parameters: parameters, success: { response, _ in
wordPressComRESTAPI.post(path, parameters: parameters, success: { response, _ in
do {
let decoder = JSONDecoder.apiDecoder
let data = try JSONSerialization.data(withJSONObject: response, options: [])
Expand Down Expand Up @@ -88,7 +88,7 @@ open class JetpackBackupServiceRemote: ServiceRemoteWordPressComREST {

let parameters = ["dismissed": true] as [String: AnyObject]

wordPressComRestApi.POST(path, parameters: parameters, success: { _, _ in
wordPressComRESTAPI.post(path, parameters: parameters, success: { _, _ in
success()
}, failure: { error, _ in
failure(error)
Expand All @@ -109,7 +109,7 @@ open class JetpackBackupServiceRemote: ServiceRemoteWordPressComREST {
path = backupPath(for: siteID)
}

wordPressComRestApi.GET(path, parameters: nil, success: { response, _ in
wordPressComRESTAPI.get(path, parameters: nil, success: { response, _ in
do {
let decoder = JSONDecoder.apiDecoder
let data = try JSONSerialization.data(withJSONObject: response, options: [])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ open class JetpackCapabilitiesServiceRemote: ServiceRemoteWordPressComREST {
let endpoint = "sites/\(siteID)/rewind/capabilities"
let path = self.path(forEndpoint: endpoint, withVersion: ._2_0)

self.wordPressComRestApi.GET(path,
self.wordPressComRESTAPI.get(path,
parameters: nil,
success: { response, _ in
if let capabilities = (response as? [String: AnyObject])?["capabilities"] as? [String] {
Expand Down
4 changes: 2 additions & 2 deletions Sources/WordPressKit/Services/JetpackProxyServiceRemote.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class JetpackProxyServiceRemote: ServiceRemoteWordPressComREST {
method: DotComMethod,
parameters: [String: AnyHashable] = [:],
locale: String? = nil,
completion: @escaping (Result<AnyObject, Error>) -> Void) -> Progress? {
completion: @escaping (Result<Any, Error>) -> Void) -> Progress? {
let urlString = self.path(forEndpoint: "jetpack-blogs/\(siteID)/rest-api", withVersion: ._1_1)

// Construct the request parameters to be forwarded to the actual endpoint.
Expand All @@ -49,7 +49,7 @@ public class JetpackProxyServiceRemote: ServiceRemoteWordPressComREST {
requestParams["locale"] = locale
}

return wordPressComRestApi.POST(urlString, parameters: requestParams as [String: AnyObject]) { response, _ in
return wordPressComRESTAPI.post(urlString, parameters: requestParams) { response, _ in
completion(.success(response))
} failure: { error, _ in
completion(.failure(error))
Expand Down
Loading