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
Using the realtime client, our onResult handler can currently use the request_id parameter to identify the request corresponding to an api call, if that call is successful. However, since the onResult callback is typed as @escaping (Result<Output, Error>) -> Void, we can't identify requests for api call failures in the same way.
Some example code demonstrating the issue:
connection = try! falClient.realtime.connect(
to: OptimizedLatentConsistency,
connectionKey: "ReproDemo",
throttleInterval: .milliseconds(0), // no need to throttle since i'm calling generate in response to a button tap
onResult: { (result: Result<LcmResponse, Error>) in
switch result {
case .success(let data):
// Can do things with data.requestId here
print(data.requestId!)
case .failure(let error):
// ISSUE: Can't tie this back to the originating request, since there's no way to access request_id
print(error)
}
}
)
The text was updated successfully, but these errors were encountered:
Thanks for bringing this up @jb-delightai. You're absolutely right, we need to add the request id to the errors. I'll work on it and let you know once it's fixed.
Using the
realtime
client, ouronResult
handler can currently use therequest_id
parameter to identify the request corresponding to an api call, if that call is successful. However, since theonResult
callback is typed as@escaping (Result<Output, Error>) -> Void
, we can't identify requests for api call failures in the same way.Some example code demonstrating the issue:
The text was updated successfully, but these errors were encountered: