sipeed/picoclaw · error
teams_webhook: webhook
Error message
teams_webhook: webhook %q must use HTTPS (got %q)
What it means
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.
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
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at pkg/channels/teams_webhook/teams_webhook.go:86 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15).
Data as JSON: /api/errors/5cc3253843121acf.
Report an issue: GitHub.
Appendix: source
Thrown at pkg/channels/teams_webhook/teams_webhook.go:86
}
// Require "default" webhook target
if _, hasDefault := cfg.Webhooks["default"]; !hasDefault {
return nil, fmt.Errorf("teams_webhook: a 'default' webhook target is required")
}
// Validate all webhook targets have valid HTTPS URLs
for name, target := range cfg.Webhooks {
webhookURL := target.WebhookURL.String()
if webhookURL == "" {
return nil, fmt.Errorf("teams_webhook: webhook %q has empty webhook_url", name)
}
parsed, err := url.Parse(webhookURL)
if err != nil {
return nil, fmt.Errorf("teams_webhook: webhook %q has invalid URL: %w", name, err)
}
if !strings.EqualFold(parsed.Scheme, "https") {
return nil, fmt.Errorf("teams_webhook: webhook %q must use HTTPS (got %q)", name, parsed.Scheme)
}
}
base := channels.NewBaseChannel(
"teams_webhook",
cfg,
bus,
[]string{
"*",
}, // Output-only channel; "*" suppresses misleading "allows EVERYONE" audit warning
channels.WithMaxMessageLength(24000), // Power Automate webhook payload limit is 28KB
)
client := goteamsnotify.NewTeamsClient()
return &TeamsWebhookChannel{
BaseChannel: base,
bc: bc,View on GitHub (pinned to 49183d7e8d)