update to go 1.24, prepare for grpc-gateway

This commit is contained in:
2025-03-24 09:48:38 -04:00
parent 787d065e69
commit 2c78dcc133
5 changed files with 40 additions and 26 deletions

View File

@ -50,9 +50,9 @@ func (w *GRPCWeather) GetWeather(ctx context.Context, req *pb.GetWeatherRequest)
if err != nil {
span.RecordError(err)
span.SetStatus(otelcodes.Error, err.Error())
return nil, status.Errorf(codes.Internal, err.Error())
return nil, status.Error(codes.Internal, err.Error())
} else if len(updates) < 1 {
return nil, status.Errorf(codes.OutOfRange, "no weather available")
return nil, status.Error(codes.OutOfRange, "no weather available")
}
span.SetStatus(otelcodes.Ok, "")