multica-ai/multica · error · ErrConnectionNotFound

composio: connection not found

Error message

composio: connection not found

What it means

Sentinel error ErrConnectionNotFound from the Composio service Disconnect path: no active Composio connection row matched this user and connection UUID (pgx.ErrNoRows or equivalent), so there is nothing to disconnect. Handler maps it to 404 'composio connection not found'.

Solutions

  1. Re-initiate the Composio connection flow; the referenced connection no longer exists.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at server/internal/integrations/composio/service.go:43 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15). Data as JSON: /api/errors/5905f5a73bbddc76. Report an issue: GitHub.

Appendix: source

Thrown at server/internal/integrations/composio/service.go:43

	sdk "github.com/multica-ai/multica/server/pkg/composio"

	"github.com/jackc/pgx/v5/pgtype"
	"github.com/multica-ai/multica/server/internal/util"
	db "github.com/multica-ai/multica/server/pkg/db/generated"
)

// Service-level errors surfaced to the handler layer.
var (
	// ErrToolkitNotSupported is returned by BeginConnect when the requested
	// toolkit has no enabled auth config in the Composio project, so there is
	// no auth_config_id to start a connect link with.
	ErrToolkitNotSupported = errors.New("composio: toolkit not supported")
	// ErrConnectNotSuccessful is returned by CompleteCallback when Composio
	// reported a non-success status — no active row is written.
	ErrConnectNotSuccessful = errors.New("composio: connection was not successful")
	// ErrConnectionNotFound is returned by Disconnect when the connection id
	// does not belong to the user (or does not exist).
	ErrConnectionNotFound = errors.New("composio: connection not found")
	// ErrAccountVerification is returned by CompleteCallback when the
	// connected_account_id carried on the callback cannot be confirmed (with
	// Composio) to belong to the user/auth-config named in the signed state —
	// i.e. a tampered or unknown account id. No local row is written.
	ErrAccountVerification = errors.New("composio: connected account verification failed")
)

// defaultStateTTL bounds how long a connect handshake may sit between
// BeginConnect and the Composio callback. Five minutes is generous for a hosted
// OAuth flow while keeping the replay window small.
const defaultStateTTL = 5 * time.Minute

// defaultAuthCacheTTL bounds how long the resolved toolkit→auth-config map is
// cached before a re-fetch from Composio. Short enough that enabling an auth
// config in the dashboard reflects within minutes; long enough that a burst of
// connect/list requests does not hammer /auth_configs.
const defaultAuthCacheTTL = 5 * time.Minute

View on GitHub (pinned to 2c0912b6ec)