Currently, then error method of the Then struct takes an HTTP StatusCode (and a message).
But I did not find any way to return custom GRPC error using GRPC Code instead. So currently, I don't think there is a way to mock AlreadyExists or ResourceExhausted GRPC errors for example.
It would be nice to add a grpc_error method to the Then struct or whatever to support this.
Currently, then
errormethod of theThenstruct takes an HTTPStatusCode(and a message).But I did not find any way to return custom GRPC error using GRPC
Codeinstead. So currently, I don't think there is a way to mockAlreadyExistsorResourceExhaustedGRPC errors for example.It would be nice to add a
grpc_errormethod to theThenstruct or whatever to support this.