{"record":{"id":"ca13fecb1b57c1ea","repo":"sipeed/picoclaw","slug":"create-matrix-client-w","errorCode":null,"errorMessage":"create matrix client: %w","messagePattern":"create matrix client: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/channels/matrix/matrix.go","lineNumber":226,"sourceCode":"\tmessageBus *bus.MessageBus,\n\tcryptoDatabasePath string,\n) (*MatrixChannel, error) {\n\thomeserver := strings.TrimSpace(cfg.Homeserver)\n\tuserID := strings.TrimSpace(cfg.UserID)\n\taccessToken := strings.TrimSpace(cfg.AccessToken.String())\n\tif homeserver == \"\" {\n\t\treturn nil, fmt.Errorf(\"matrix homeserver is required\")\n\t}\n\tif userID == \"\" {\n\t\treturn nil, fmt.Errorf(\"matrix user_id is required\")\n\t}\n\tif accessToken == \"\" {\n\t\treturn nil, fmt.Errorf(\"matrix access_token is required\")\n\t}\n\n\tclient, err := mautrix.NewClient(homeserver, id.UserID(userID), accessToken)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"create matrix client: %w\", err)\n\t}\n\tif cfg.DeviceID != \"\" {\n\t\tclient.DeviceID = id.DeviceID(cfg.DeviceID)\n\t}\n\n\tsyncer, ok := client.Syncer.(*mautrix.DefaultSyncer)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"matrix syncer is not *mautrix.DefaultSyncer\")\n\t}\n\n\tbase := channels.NewBaseChannel(\n\t\t\"matrix\",\n\t\tcfg,\n\t\tmessageBus,\n\t\tbc.AllowFrom,\n\t\tchannels.WithMaxMessageLength(65536),\n\t\tchannels.WithGroupTrigger(bc.GroupTrigger),\n\t\tchannels.WithReasoningChannelID(bc.ReasoningChannelID),","sourceCodeStart":208,"sourceCodeEnd":244,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/channels/matrix/matrix.go#L208-L244","documentation":"Error \"create matrix client: %w\" thrown in sipeed/picoclaw.","triggerScenarios":"Thrown at pkg/channels/matrix/matrix.go:226 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}