• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

99designs / gqlgen / 7357739561

29 Dec 2023 03:10PM UTC coverage: 75.914% (-0.02%) from 75.93%
7357739561

push

github

web-flow
fix: avoid panic from tracing on bad request (#2871)

This fixes a panic which arises from the tracing components when a request has some defect which results in an error when creating the operation context. The transports consistently handle this by calling `DispatchError(graphql.WithOperationContext(ctx, rc), err)` where `rc` is the OperationContext which was not correctly constructed. This seems dangerous, because middleware may assume that if there in an `OperationContext` in the `context.Context` than they are being invoked on a normal codepath and can assume their other interceptors have been invoked in the normal order. Also, using a value returned by a function which also returned a non-nil error is very unusual. However, I have no idea what the impact of changing that dangerous behavior in the transports would be, so I opted to make the tracing component more resilient instead.

4 of 4 new or added lines in 1 file covered. (100.0%)

7 existing lines in 3 files now uncovered.

6918 of 9113 relevant lines covered (75.91%)

1437.31 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

64.81
/codegen/object.go


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc