Closed WilliamDeBruin closed 7 months ago
Hi @WilliamDeBruin, thank you for requesting this. Indeed, we need this functionality in rueidishook. We have done this in the mock package: https://github.com/redis/rueidis/blob/6a8ba489f1974430cd5032e72a65a2010bf68601/mock/result.go#L22-L25
I think we can copy the mock.ErrorResult
to rueidishook as well.
Yes that would be super helpful! Thanks for the quick response!
As title states, when wrapping a Rueidis client with a hook, the hook should be able to return a custom error from
func (r rueidisHook) Do(...)
and similar functions.Consider this trivial example, modified from the rueidishook package:
What is the recommended strategy to pass a useful message to the caller in this case?