{"record":{"id":"44c6d62695724f5c","repo":"chenhg5/cc-connect","slug":"weibo-app-id-and-app-secret-are-required","errorCode":null,"errorMessage":"weibo: app_id and app_secret are required","messagePattern":"weibo: app_id and app_secret are required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"platform/weibo/weibo.go","lineNumber":77,"sourceCode":"\ttokenMu     sync.Mutex\n\tuid         string\n\n\tctx    context.Context\n\tcancel context.CancelFunc\n\n\tseen   map[string]struct{}\n\tseenMu sync.Mutex\n}\n\nfunc New(opts map[string]any) (core.Platform, error) {\n\tname, _ := opts[\"name\"].(string)\n\tif name == \"\" {\n\t\tname = \"weibo\"\n\t}\n\tappID, _ := opts[\"app_id\"].(string)\n\tappSecret, _ := opts[\"app_secret\"].(string)\n\tif appID == \"\" || appSecret == \"\" {\n\t\treturn nil, fmt.Errorf(\"weibo: app_id and app_secret are required\")\n\t}\n\n\ttokenEndpoint, _ := opts[\"token_endpoint\"].(string)\n\tif tokenEndpoint == \"\" {\n\t\ttokenEndpoint = defaultTokenEndpoint\n\t}\n\twsEndpoint, _ := opts[\"ws_endpoint\"].(string)\n\tif wsEndpoint == \"\" {\n\t\twsEndpoint = defaultWSEndpoint\n\t}\n\n\tallowFrom, _ := opts[\"allow_from\"].(string)\n\tcore.CheckAllowFrom(name, allowFrom)\n\n\treturn &Platform{\n\t\tname:          name,\n\t\tappID:         appID,\n\t\tappSecret:     appSecret,","sourceCodeStart":59,"sourceCodeEnd":95,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/platform/weibo/weibo.go#L59-L95","documentation":"Configuration guard in the weibo platform constructor New: one or both of the mandatory app_id / app_secret options are missing or empty strings in config.toml. Without them the platform cannot authenticate against the Weibo open platform token endpoint, so construction fails at startup rather than at first use.","triggerScenarios":"Thrown at platform/weibo/weibo.go:77 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set app_id and app_secret under the [platform.weibo] section in config.toml","Copy both values exactly from the Weibo open-platform app console","Fail fast at startup (as the code does) and surface the error in doctor output"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4000b2338aa6e850c99df54f8b0ed6ed7460b401","analyzedAt":"2026-09-06T11:45:09.575Z","contentChangedAt":"2026-09-06T11:45:09.575Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}