MCPcopy
hub / github.com/grafana/tempo / grpcError

Function grpcError

modules/frontend/pipeline/collector_grpc.go:114–128  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

112}
113
114func grpcError(err error) error {
115 // if is already a grpc err then just return. something with more context has already created a
116 // standard grpc error and we will honor that
117 if _, ok := status.FromError(err); ok {
118 return err
119 }
120
121 // if this is context cancelled, we return a grpc cancelled error
122 if errors.Is(err, context.Canceled) {
123 return status.Error(codes.Canceled, err.Error())
124 }
125
126 // rest all fall into internal server error
127 return status.Error(codes.Internal, err.Error())
128}

Callers 2

RoundTripMethod · 0.85
sendSegmentedMethod · 0.85

Calls 1

ErrorMethod · 0.65

Tested by

no test coverage detected