You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But w identity() added to call:,
var subscriptions = Set()
DB.salesforce.identity().sink(receiveCompletion: { (completion) in
switch completion {
case .finished:
print("Logged in")
case let .failure(error) :
print("Failed to login. Error: (error)")
}
}) { identity in
DB.salesforce.limits()
.sink(receiveCompletion: { (completion) in
switch completion {
case .finished:
print("Finished limits query")
case let .failure(error) :
print(error)
}
}, receiveValue: { (limitResults: [String:Limit]) in
print(limitResults)
}).store(in: &subscriptions)
}.store(in: &subscriptions)
}
it works. The old limits() used to leverage the userinfo somehow, or why did it work previously?
The text was updated successfully, but these errors were encountered:
Hi @perbrondum. Your code works ok for me, so I'm not able to reproduce your results. See below. I have seen the 'cancelled' error when the user closes the Salesforce-hosted login screen without entering credentials.
DB.salesforce.limits()
.sink(receiveCompletion: { (completion) in
switch completion {
case .finished:
print("Finished limits query")
case let .failure(error) :
print(error)
}
}, receiveValue: { (limitResults: [String:Limit]) in
print(limitResults)
}).store(in: &subscriptions)
alone (with a preceding login, fails w: -999 (missing UserInfo).
2020-04-02 21:18:46.092831+0200 testComb[19823:1760466] Task <86442BB7-2523-4325-AAD4-991B19C63CA5>.<3> finished with error [-999] Error Domain=NSURLErrorDomain Code=-999 "cancelled" UserInfo={NSErrorFailingURLStringKey=https://na84.salesforce.com/services/data/v47.0/limits, NSLocalizedDescription=cancelled, NSErrorFailingURLKey=https://na84.salesforce.com/services/data/v47.0/limits}
But w identity() added to call:,
var subscriptions = Set()
DB.salesforce.identity().sink(receiveCompletion: { (completion) in
switch completion {
case .finished:
print("Logged in")
case let .failure(error) :
print("Failed to login. Error: (error)")
}
}) { identity in
DB.salesforce.limits()
.sink(receiveCompletion: { (completion) in
switch completion {
case .finished:
print("Finished limits query")
case let .failure(error) :
print(error)
}
}, receiveValue: { (limitResults: [String:Limit]) in
print(limitResults)
}).store(in: &subscriptions)
}.store(in: &subscriptions)
}
it works. The old limits() used to leverage the userinfo somehow, or why did it work previously?
The text was updated successfully, but these errors were encountered: