larksuite/cli · error
round trip aborted by extension
Error message
round trip aborted by extension
What it means
Package-level sentinel in extension/transport marking that an AbortableInterceptor short-circuited a request via PreRoundTripE; the built-in middleware returns *AbortError, whose Is method matches this sentinel at any nesting depth. It is a classification handle rather than a direct failure: it fires whenever any extension deliberately cancels a round trip.
Source
Thrown at extension/transport/errors.go:16
// Copyright (c) 2026 Lark Technologies Pte. Ltd.
// SPDX-License-Identifier: MIT
package transport
import (
"errors"
"fmt"
)
// ErrAborted is a sentinel matched by errors.Is on any extension-triggered
// round-trip abort. Callers that only need to know whether an error was
// caused by an extension interception should use:
//
// if errors.Is(err, transport.ErrAborted) { ... }
var ErrAborted = errors.New("round trip aborted by extension")
// AbortError is returned by the built-in middleware when an AbortableInterceptor
// short-circuits a request via PreRoundTripE. It wraps the extension's original
// reason and carries the extension's Provider.Name() for traceability.
//
// Use errors.As to recover the typed error:
//
// var aErr *transport.AbortError
// if errors.As(err, &aErr) {
// log.Printf("blocked by %s: %v", aErr.Extension, aErr.Reason)
// }
//
// errors.Is(err, transport.ErrAborted) also works, and errors.Is against the
// inner reason still works via Unwrap.
type AbortError struct {
// Extension is the name of the Provider whose interceptor aborted the
// request (from Provider.Name()). May be empty if the provider did not
// supply a name.View on GitHub (pinned to 7fd6ef3c07)
Solutions
- Match with errors.Is(err, transport.ErrAborted) and treat it as an extension-declared cancellation, not a transport failure
- Inspect the wrapped *AbortError.Reason for the extension's specific cause before reporting
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at extension/transport/errors.go:16 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of larksuite/cli@7fd6ef3c07 (2026-09-04).
Data as JSON: /api/errors/51cbea3f64ceab74.
Report an issue: GitHub.