{"record":{"id":"ffc53611e48d7ca6","repo":"multica-ai/multica","slug":"dingtalk-installation-not-found","errorCode":null,"errorMessage":"dingtalk installation not found","messagePattern":"dingtalk installation not found","errorType":"http","errorClass":"ErrInstallationNotFound","httpStatus":404,"severity":"error","filePath":"server/internal/integrations/dingtalk/install.go","lineNumber":30,"sourceCode":"\t\"github.com/jackc/pgx/v5/pgconn\"\n\t\"github.com/jackc/pgx/v5/pgtype\"\n\n\t\"github.com/multica-ai/multica/server/internal/integrations/channel/engine\"\n\t\"github.com/multica-ai/multica/server/internal/util/secretbox\"\n\tdb \"github.com/multica-ai/multica/server/pkg/db/generated\"\n)\n\n// This file is the DingTalk install backend. DingTalk uses the\n// bring-your-own-app (BYO) model: the workspace admin creates their own DingTalk\n// Stream-mode robot, and pastes its AppKey (client id) + AppSecret (client\n// secret) into Multica (the paste path lives in byo_install.go). The\n// InstallService owns the at-rest encryption of the AppSecret — so no caller can\n// write a channel_installation with a plaintext secret — plus the shared\n// persistInstall transaction and the list / get / revoke management surface.\n\nvar (\n\t// ErrInstallationNotFound surfaces \"no row matches in this workspace\".\n\tErrInstallationNotFound = errors.New(\"dingtalk installation not found\")\n\t// ErrRobotOwnedByAnotherWorkspace is returned when the pasted DingTalk robot\n\t// is already connected to a live owner in a DIFFERENT Multica workspace — it\n\t// would collide with the (channel_type, app_id) routing index. A DingTalk\n\t// robot is one bot identity and maps to one installation/default agent;\n\t// group-specific routes may target other agents inside that workspace.\n\tErrRobotOwnedByAnotherWorkspace = errors.New(\"dingtalk: this DingTalk robot is already connected to a different Multica workspace\")\n\t// ErrRobotOwnedBySameWorkspace is returned when the robot is already connected\n\t// to a DIFFERENT (live, non-archived) agent in the SAME workspace, pointing\n\t// the user at the Disconnect they can actually reach (#4810).\n\tErrRobotOwnedBySameWorkspace = errors.New(\"dingtalk: this DingTalk robot is already connected to another agent in this workspace\")\n\t// ErrRobotOwnedByArchivedAgent is returned when the robot's owning agent is\n\t// archived (and so still holds the robot, since archiving is reversible). The\n\t// user recovers by restoring that agent or disconnecting its robot.\n\tErrRobotOwnedByArchivedAgent = errors.New(\"dingtalk: this DingTalk robot is connected to an archived agent in this workspace\")\n)\n\n// installQueries is the slice of generated queries InstallService needs. WithTx\n// returns the same interface bound to a transaction so persistInstall runs its","sourceCodeStart":12,"sourceCodeEnd":48,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/internal/integrations/dingtalk/install.go#L12-L48","documentation":"Error \"dingtalk installation not found\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/internal/integrations/dingtalk/install.go:30 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reinstall the DingTalk 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-15T17:31:12.345Z"}