{"record":{"id":"a006094173c6164e","repo":"multica-ai/multica","slug":"wecom-installation-not-found","errorCode":null,"errorMessage":"wecom: installation not found","messagePattern":"wecom: installation not found","errorType":"exception","errorClass":null,"httpStatus":404,"severity":"error","filePath":"server/internal/integrations/wecom/installation.go","lineNumber":409,"sourceCode":"\t}\n}\n\n// Revoke flips status to 'revoked' — the row is preserved so audit trails\n// remain queryable, and a subsequent Upsert flips it back to 'active'\n// atomically. A revoked row is skipped by the router's installation resolver\n// (Active=false → invalid_event drop with audit).\nfunc (s *InstallationService) Revoke(ctx context.Context, id pgtype.UUID) error {\n\treturn s.store.Queries.SetChannelInstallationStatus(ctx, db.SetChannelInstallationStatusParams{\n\t\tID:     id,\n\t\tStatus: string(InstallationRevoked),\n\t})\n}\n\n// ErrInstallationNotFound is returned by GetInWorkspace when either no row\n// exists at the given (id, workspace) or the row belongs to a different\n// channel_type. It is distinct from a plain pgx.ErrNoRows so HTTP handlers\n// can map it to 404 without importing pgx.\nvar ErrInstallationNotFound = errors.New(\"wecom: installation not found\")\n\n// ListByWorkspace returns every wecom installation for the given workspace\n// in creation order. Used by the Settings and Agent-Integrations tabs to\n// render \"connected bots\" lists; revoked rows are included so operators can\n// see history (the UI filters on Status).\nfunc (s *InstallationService) ListByWorkspace(ctx context.Context, workspaceID pgtype.UUID) ([]Installation, error) {\n\trows, err := s.store.Queries.ListChannelInstallationsByWorkspace(ctx, db.ListChannelInstallationsByWorkspaceParams{\n\t\tWorkspaceID: workspaceID,\n\t\tChannelType: channelTypeWecom,\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tout := make([]Installation, 0, len(rows))\n\tfor _, row := range rows {\n\t\tinst, err := installationFromRow(row)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"wecom: decode installation %s: %w\", row.ID.String(), err)","sourceCodeStart":391,"sourceCodeEnd":427,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/integrations/wecom/installation.go#L391-L427","documentation":"Error \"wecom: installation not found\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/integrations/wecom/installation.go:409 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reinstall the WeCom integration; the installation record was not found."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}