{"record":{"id":"c6fc2c549e6ea4dc","repo":"sipeed/picoclaw","slug":"invalid-proxy-url-q-w","errorCode":null,"errorMessage":"invalid proxy URL %q: %w","messagePattern":"invalid proxy URL %q: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/channels/telegram/telegram.go","lineNumber":95,"sourceCode":"}\n\ntype telegramMessageParts struct {\n\tcontent    []string\n\tmediaPaths []string\n}\n\nfunc NewTelegramChannel(\n\tbc *config.Channel,\n\ttelegramCfg *config.TelegramSettings,\n\tbus *bus.MessageBus,\n) (*TelegramChannel, error) {\n\tchannelName := bc.Name()\n\tvar opts []telego.BotOption\n\n\tif telegramCfg.Proxy != \"\" {\n\t\tproxyURL, parseErr := url.Parse(telegramCfg.Proxy)\n\t\tif parseErr != nil {\n\t\t\treturn nil, fmt.Errorf(\"invalid proxy URL %q: %w\", telegramCfg.Proxy, parseErr)\n\t\t}\n\t\topts = append(opts, telego.WithHTTPClient(&http.Client{\n\t\t\tTransport: &http.Transport{\n\t\t\t\tProxy: http.ProxyURL(proxyURL),\n\t\t\t},\n\t\t}))\n\t} else if os.Getenv(\"HTTP_PROXY\") != \"\" || os.Getenv(\"HTTPS_PROXY\") != \"\" {\n\t\t// Use environment proxy if configured\n\t\topts = append(opts, telego.WithHTTPClient(&http.Client{\n\t\t\tTransport: &http.Transport{\n\t\t\t\tProxy: http.ProxyFromEnvironment,\n\t\t\t},\n\t\t}))\n\t}\n\n\tif baseURL := strings.TrimRight(strings.TrimSpace(telegramCfg.BaseURL), \"/\"); baseURL != \"\" {\n\t\topts = append(opts, telego.WithAPIServer(baseURL))\n\t}","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/channels/telegram/telegram.go#L77-L113","documentation":"Error \"invalid proxy URL %q: %w\" thrown in sipeed/picoclaw.","triggerScenarios":"Thrown at pkg/channels/telegram/telegram.go:95 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-15T22:17:37.221Z"}