Merge pull request #2112 from devlzcode/expose-newfutureerror

feat: Expose newFutureError for developer friendliness
This commit is contained in:
Olaoluwa Osuntokun 2024-02-26 16:20:30 -08:00 committed by GitHub
commit 9ea2eea99b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -984,6 +984,11 @@ func newFutureError(err error) chan *Response {
return responseChan
}
// Expose newFutureError for developer usage when creating custom commands.
func NewFutureError(err error) chan *Response {
return newFutureError(err)
}
// ReceiveFuture receives from the passed futureResult channel to extract a
// reply or any errors. The examined errors include an error in the
// futureResult and the error in the reply from the server. This will block