{"record":{"id":"8ab8cc3ad2300f52","repo":"chenhg5/cc-connect","slug":"matrix-invalid-proxy-url-q-w","errorCode":null,"errorMessage":"matrix: invalid proxy URL %q: %w","messagePattern":"matrix: invalid proxy URL %q: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"platform/matrix/matrix.go","lineNumber":104,"sourceCode":"\t}\n\tautoVerify, _ := opts[\"auto_verify\"].(bool)\n\tif !autoVerify {\n\t\t_, hasKey := opts[\"auto_verify\"]\n\t\tif !hasKey {\n\t\t\tautoVerify = true // default true\n\t\t}\n\t}\n\tproxyURL, _ := opts[\"proxy\"].(string)\n\tcrossSigningPassword, _ := opts[\"cross_signing_password\"].(string)\n\tif env := os.Getenv(\"MATRIX_CROSS_SIGNING_PASSWORD\"); env != \"\" {\n\t\tcrossSigningPassword = env\n\t}\n\n\thttpClient := &http.Client{Timeout: 120 * time.Second}\n\tif proxyURL != \"\" {\n\t\tu, err := url.Parse(proxyURL)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"matrix: invalid proxy URL %q: %w\", proxyURL, err)\n\t\t}\n\t\thttpClient.Transport = &http.Transport{Proxy: http.ProxyURL(u)}\n\t\tslog.Info(\"matrix: using proxy\", \"proxy\", u.Host)\n\t}\n\n\treturn &Platform{\n\t\thomeserver:            homeserver,\n\t\taccessToken:           accessToken,\n\t\tuserID:                userID,\n\t\tallowFrom:             allowFrom,\n\t\tgroupReplyAll:         groupReplyAll,\n\t\tshareSessionInChannel: shareSession,\n\t\tautoJoin:              autoJoin,\n\t\tproxyURL:              proxyURL,\n\t\tautoVerify:            autoVerify,\n\t\tcrossSigningPassword:  crossSigningPassword,\n\t\thttpClient:            httpClient,\n\t\tdedup:                 core.MessageDedup{},","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/chenhg5/cc-connect/blob/4000b2338aa6e850c99df54f8b0ed6ed7460b401/platform/matrix/matrix.go#L86-L122","documentation":"Config validation guard in the Matrix platform factory: the configured proxy URL failed url.Parse, meaning the `proxy` option in config.toml is malformed (bad scheme, control characters, or unsupported format).","triggerScenarios":"Thrown at platform/matrix/matrix.go:104 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the proxy URL scheme/host (e.g. http://host:port or socks5://...)","Remove the proxy option to connect directly"],"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-14T05:17:10.506Z"}