Description
The Apollo 3, 4, and 5 HTTP interceptors currently handle CancellationException as a generic failure and set the span status to SpanStatus.INTERNAL_ERROR.
Cancellation is an expected control-flow outcome rather than an internal error. Detect CancellationException explicitly and set the span status to SpanStatus.CANCELLED.
The original exception must still be rethrown so coroutine cancellation semantics remain unchanged.
Acceptance criteria
- Apollo 3, 4, and 5 interceptors set
SpanStatus.CANCELLED when request execution throws CancellationException.
- The original exception is rethrown unchanged.
- Existing
ApolloHttpException status handling remains unchanged.
- Unit tests cover cancellation behavior in all three integrations.
Source: #6074 (comment)
Description
The Apollo 3, 4, and 5 HTTP interceptors currently handle
CancellationExceptionas a generic failure and set the span status toSpanStatus.INTERNAL_ERROR.Cancellation is an expected control-flow outcome rather than an internal error. Detect
CancellationExceptionexplicitly and set the span status toSpanStatus.CANCELLED.The original exception must still be rethrown so coroutine cancellation semantics remain unchanged.
Acceptance criteria
SpanStatus.CANCELLEDwhen request execution throwsCancellationException.ApolloHttpExceptionstatus handling remains unchanged.Source: #6074 (comment)