Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix not found error for gateway handler #2726

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions pkg/gateway/lb/handler/grpc/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1904,13 +1904,12 @@
}

if errs != nil {
st, _ := status.FromError(err)
st, _ := status.FromError(errs)

Check warning on line 1907 in pkg/gateway/lb/handler/grpc/handler.go

View check run for this annotation

Codecov / codecov/patch

pkg/gateway/lb/handler/grpc/handler.go#L1907

Added line #L1907 was not covered by tests
if st != nil && span != nil {
span.RecordError(err)
span.RecordError(errs)

Check warning on line 1909 in pkg/gateway/lb/handler/grpc/handler.go

View check run for this annotation

Codecov / codecov/patch

pkg/gateway/lb/handler/grpc/handler.go#L1909

Added line #L1909 was not covered by tests
span.SetAttributes(trace.FromGRPCStatus(st.Code(), st.Message())...)
span.SetStatus(trace.StatusError, err.Error())
span.SetStatus(trace.StatusError, errs.Error())

Check warning on line 1911 in pkg/gateway/lb/handler/grpc/handler.go

View check run for this annotation

Codecov / codecov/patch

pkg/gateway/lb/handler/grpc/handler.go#L1911

Added line #L1911 was not covered by tests
datelier marked this conversation as resolved.
Show resolved Hide resolved
}
errs = err
}

return locs, errs
Expand Down Expand Up @@ -2735,13 +2734,12 @@
}

if errs != nil {
st, _ := status.FromError(err)
st, _ := status.FromError(errs)

Check warning on line 2737 in pkg/gateway/lb/handler/grpc/handler.go

View check run for this annotation

Codecov / codecov/patch

pkg/gateway/lb/handler/grpc/handler.go#L2737

Added line #L2737 was not covered by tests
if st != nil && span != nil {
span.RecordError(err)
span.RecordError(errs)

Check warning on line 2739 in pkg/gateway/lb/handler/grpc/handler.go

View check run for this annotation

Codecov / codecov/patch

pkg/gateway/lb/handler/grpc/handler.go#L2739

Added line #L2739 was not covered by tests
span.SetAttributes(trace.FromGRPCStatus(st.Code(), st.Message())...)
span.SetStatus(trace.StatusError, err.Error())
span.SetStatus(trace.StatusError, errs.Error())

Check warning on line 2741 in pkg/gateway/lb/handler/grpc/handler.go

View check run for this annotation

Codecov / codecov/patch

pkg/gateway/lb/handler/grpc/handler.go#L2741

Added line #L2741 was not covered by tests
}
errs = err
}

return locs, errs
Expand Down
Loading