{"record":{"id":"5cc3253843121acf","repo":"sipeed/picoclaw","slug":"teams-webhook-webhook-q-must-use-https-got-q","errorCode":null,"errorMessage":"teams_webhook: webhook %q must use HTTPS (got %q)","messagePattern":"teams_webhook: webhook %q must use HTTPS \\(got %q\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/channels/teams_webhook/teams_webhook.go","lineNumber":86,"sourceCode":"\t}\n\n\t// Require \"default\" webhook target\n\tif _, hasDefault := cfg.Webhooks[\"default\"]; !hasDefault {\n\t\treturn nil, fmt.Errorf(\"teams_webhook: a 'default' webhook target is required\")\n\t}\n\n\t// Validate all webhook targets have valid HTTPS URLs\n\tfor name, target := range cfg.Webhooks {\n\t\twebhookURL := target.WebhookURL.String()\n\t\tif webhookURL == \"\" {\n\t\t\treturn nil, fmt.Errorf(\"teams_webhook: webhook %q has empty webhook_url\", name)\n\t\t}\n\t\tparsed, err := url.Parse(webhookURL)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"teams_webhook: webhook %q has invalid URL: %w\", name, err)\n\t\t}\n\t\tif !strings.EqualFold(parsed.Scheme, \"https\") {\n\t\t\treturn nil, fmt.Errorf(\"teams_webhook: webhook %q must use HTTPS (got %q)\", name, parsed.Scheme)\n\t\t}\n\t}\n\n\tbase := channels.NewBaseChannel(\n\t\t\"teams_webhook\",\n\t\tcfg,\n\t\tbus,\n\t\t[]string{\n\t\t\t\"*\",\n\t\t}, // Output-only channel; \"*\" suppresses misleading \"allows EVERYONE\" audit warning\n\t\tchannels.WithMaxMessageLength(24000), // Power Automate webhook payload limit is 28KB\n\t)\n\n\tclient := goteamsnotify.NewTeamsClient()\n\n\treturn &TeamsWebhookChannel{\n\t\tBaseChannel: base,\n\t\tbc:          bc,","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/channels/teams_webhook/teams_webhook.go#L68-L104","documentation":"A generic validation guard inside NewTeamsWebhookChannel: while iterating cfg.Webhooks, each target's WebhookURL is parsed and its scheme checked, and this error fires when a webhook target's URL does not use HTTPS. Microsoft Teams inbound webhooks only accept HTTPS endpoints, so a http:// (or other-scheme) URL would be rejected at send time; the constructor fails fast instead. The at-fault input is the webhook_url of the named webhook target in the channel configuration.","triggerScenarios":"Thrown at pkg/channels/teams_webhook/teams_webhook.go:86 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Change the offending webhook target's URL to an https:// endpoint, e.g. https://yourtenant.webhook.office.com/webhookb2/...","If the URL points at a proxy you control, put TLS on the proxy (certificate + listener) so the same endpoint is served over https","Move plain-HTTP targets behind an HTTPS reverse proxy and update webhook_url to the https address"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","contentChangedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}