{"record":{"id":"214bfd4a432b1312","repo":"AlexxIT/go2rtc","slug":"streams-source-not-supported","errorCode":null,"errorMessage":"streams: source not supported","messagePattern":"streams: source not supported","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/streams/streams.go","lineNumber":56,"sourceCode":"\ttime.AfterFunc(time.Second, func() {\n\t\t// range for nil map is OK\n\t\tfor name, dst := range cfg.Publish {\n\t\t\tif stream := Get(name); stream != nil {\n\t\t\t\tPublish(stream, dst)\n\t\t\t}\n\t\t}\n\t\tfor name, rawQuery := range cfg.Preload {\n\t\t\tif err := AddPreload(name, rawQuery); err != nil {\n\t\t\t\tlog.Error().Err(err).Caller().Send()\n\t\t\t}\n\t\t}\n\t})\n}\n\nfunc New(name string, sources ...string) (*Stream, error) {\n\tfor _, source := range sources {\n\t\tif !HasProducer(source) {\n\t\t\treturn nil, errors.New(\"streams: source not supported\")\n\t\t}\n\n\t\tif err := Validate(source); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t}\n\n\tstream := NewStream(sources)\n\n\tstreamsMu.Lock()\n\tstreams[name] = stream\n\tstreamsMu.Unlock()\n\n\treturn stream, nil\n}\n\nfunc Patch(name string, source string) (*Stream, error) {\n\tstreamsMu.Lock()","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/AlexxIT/go2rtc/blob/c245815e75e2a5fd60b4290f12bfc04e55a984d3/internal/streams/streams.go#L38-L74","documentation":"Stream construction (New) rejects a source when HasProducer reports no producer available for its scheme — no handler is registered for that URL type. Unlike the handlers.go error, this is the streams-level gate: New validates every source up front and refuses to create the stream if any source cannot be produced.","triggerScenarios":"Thrown at internal/streams/streams.go:56 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify each source URL scheme is spelled correctly and is supported","Import/register the producer module for that scheme","Remove the unsupported source from the New(...) arguments"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c245815e75e2a5fd60b4290f12bfc04e55a984d3","analyzedAt":"2026-09-07T11:47:02.965Z","contentChangedAt":"2026-09-07T11:47:02.965Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}