Given the following gRPC server side code:
import (
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
....
)
....
func (s *Router) Assign(ctx context.Context, req *api.Request(*api.Response, error) {
return nil, status.Errorf(codes.PermissionDenied,
}
....
What is the recommended technique for asserting client side that the error is of code = codes.PermissionDenied
?