{"record":{"id":"923f21a614678aae","repo":"cloudflare/cloudflared","slug":"unsupported-error-type-s","errorCode":null,"errorMessage":"unsupported error type: %s","messagePattern":"unsupported error type: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"connection/quic_connection.go","lineNumber":245,"sourceCode":"\tcase pogs.ConnectionTypeHTTP, pogs.ConnectionTypeWebsocket:\n\t\ttracedReq, err := buildHTTPRequest(ctx, request, stream, q.connIndex, q.logger)\n\t\tif err != nil {\n\t\t\treturn err, false\n\t\t}\n\t\tw := newHTTPResponseAdapter(stream)\n\t\treturn originProxy.ProxyHTTP(&w, tracedReq, request.Type == pogs.ConnectionTypeWebsocket), w.connectResponseSent\n\n\tcase pogs.ConnectionTypeTCP:\n\t\trwa := &streamReadWriteAcker{RequestServerStream: stream}\n\t\tmetadata := request.MetadataMap()\n\t\treturn originProxy.ProxyTCP(ctx, rwa, &TCPRequest{\n\t\t\tDest:      request.Dest,\n\t\t\tFlowID:    metadata[QUICMetadataFlowID],\n\t\t\tCfTraceID: metadata[tracing.TracerContextName],\n\t\t\tConnIndex: q.connIndex,\n\t\t}), rwa.connectResponseSent\n\tdefault:\n\t\treturn fmt.Errorf(\"unsupported error type: %s\", request.Type), false\n\t}\n}\n\n// UpdateConfiguration is the RPC method invoked by edge when there is a new configuration\nfunc (q *quicConnection) UpdateConfiguration(ctx context.Context, version int32, config []byte) *pogs.UpdateConfigurationResponse {\n\treturn q.orchestrator.UpdateConfig(version, config)\n}\n\n// streamReadWriteAcker is a light wrapper over QUIC streams with a callback to send response back to\n// the client.\ntype streamReadWriteAcker struct {\n\t*rpcquic.RequestServerStream\n\tconnectResponseSent bool\n}\n\n// AckConnection acks response back to the proxy.\nfunc (s *streamReadWriteAcker) AckConnection(tracePropagation string) error {\n\tmetadata := []pogs.Metadata{}","sourceCodeStart":227,"sourceCodeEnd":263,"githubUrl":"https://github.com/cloudflare/cloudflared/blob/2253eeeb25a44a713a4b60b8ba1e1b3f377d1a0f/connection/quic_connection.go#L227-L263","documentation":"dispatchRequest builds the response payload for an incoming edge request based on request.Type. When the request type is not one of the known types (e.g. not a connection flow/rpc type), it returns an \"unsupported error type\" error so the caller (handleDataStream) can report an unknown request class back to the edge. This guards against protocol drift where the edge sends a request type this cloudflared version does not implement.","triggerScenarios":"An edge request arrives via handleDataStream whose request.Type does not match any known case in dispatchRequest's switch (e.g. a newer edge protocol request type hitting an older cloudflared binary, or a corrupted/unexpected request metadata payload).","commonSituations":"Running a stale cloudflared version against a newer edge that emits new request types; protocol/version skew during rolling deploys; custom or intermediate proxies replaying malformed tunnel frames.","solutions":["Upgrade cloudflared to the latest release so it understands the request types the edge sends","If you operate a fixed cloudflared version, pin a compatible edge protocol via Cloudflare support","Check cloudflared logs for the exact %s value reported to identify the unknown request type","Report persistent occurrences to Cloudflare support with the request type string"],"exampleFix":"// before\ndefault:\n\treturn fmt.Errorf(\"unsupported error type: %s\", request.Type), false\n// after\ndefault:\n\t// keep old behavior but log the unknown type for diagnostics\n\tq.logger.Error().Msgf(\"unsupported request type: %s\", request.Type)\n\treturn fmt.Errorf(\"unsupported error type: %s\", request.Type), false","handlingStrategy":"try-catch","validationCode":"// Go has no runtime enum for request.Type; keep a known-types set and check before dispatch\nvar knownRequestTypes = map[string]bool{\"flowRPC\": true, \"webSocket\": true}\nif !knownRequestTypes[request.Type] {\n\tlog.Printf(\"skipping unknown request type %q\", request.Type)\n}","typeGuard":null,"tryCatchPattern":"if _, err := dispatchRequest(ctx, req); err != nil {\n\tif strings.HasPrefix(err.Error(), \"unsupported error type\") {\n\t\t// log and continue; likely version skew — schedule an upgrade check\n\t\tlog.Warn(err)\n\t} else {\n\t\treturn err\n\t}\n}","preventionTips":["Keep cloudflared updated to match edge protocol versions","Log the offending request type string for triage","Subscribe to cloudflared release notes for protocol changes"],"tags":["go","quic","protocol","tunnel"],"backgroundTag":"unsupported-enum-value","analyzedSha":"2253eeeb25a44a713a4b60b8ba1e1b3f377d1a0f","analyzedAt":"2026-09-06T04:14:33.757Z","contentChangedAt":"2026-09-06T04:14:33.757Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}