{"record":{"id":"7fa669858c48f483","repo":"dotnet/reactive","slug":"source1","errorCode":null,"errorMessage":"source1","messagePattern":"source1","errorType":"validation","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.cs","lineNumber":970,"sourceCode":"        /// <param name=\"source5\">Fifth observable source.</param>\n        /// <param name=\"source6\">Sixth observable source.</param>\n        /// <param name=\"source7\">Seventh observable source.</param>\n        /// <param name=\"source8\">Eighth observable source.</param>\n        /// <param name=\"source9\">Ninth observable source.</param>\n        /// <param name=\"source10\">Tenth observable source.</param>\n        /// <param name=\"source11\">Eleventh observable source.</param>\n        /// <param name=\"source12\">Twelfth observable source.</param>\n        /// <param name=\"source13\">Thirteenth observable source.</param>\n        /// <param name=\"source14\">Fourteenth observable source.</param>\n        /// <param name=\"source15\">Fifteenth observable source.</param>\n        /// <param name=\"resultSelector\">Function to invoke for each series of elements at corresponding indexes in the sources.</param>\n        /// <returns>An observable sequence containing the result of combining elements of the sources using the specified result selector function.</returns>\n        /// <exception cref=\"ArgumentNullException\"><paramref name=\"source1\"/> or <paramref name=\"source2\"/> or <paramref name=\"source3\"/> or <paramref name=\"source4\"/> or <paramref name=\"source5\"/> or <paramref name=\"source6\"/> or <paramref name=\"source7\"/> or <paramref name=\"source8\"/> or <paramref name=\"source9\"/> or <paramref name=\"source10\"/> or <paramref name=\"source11\"/> or <paramref name=\"source12\"/> or <paramref name=\"source13\"/> or <paramref name=\"source14\"/> or <paramref name=\"source15\"/> or <paramref name=\"resultSelector\"/> is null.</exception>\n        public static IObservable<TResult> Zip<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TResult>(this IObservable<TSource1> source1, IObservable<TSource2> source2, IObservable<TSource3> source3, IObservable<TSource4> source4, IObservable<TSource5> source5, IObservable<TSource6> source6, IObservable<TSource7> source7, IObservable<TSource8> source8, IObservable<TSource9> source9, IObservable<TSource10> source10, IObservable<TSource11> source11, IObservable<TSource12> source12, IObservable<TSource13> source13, IObservable<TSource14> source14, IObservable<TSource15> source15, Func<TSource1, TSource2, TSource3, TSource4, TSource5, TSource6, TSource7, TSource8, TSource9, TSource10, TSource11, TSource12, TSource13, TSource14, TSource15, TResult> resultSelector)\n        {\n            if (source1 == null)\n            {\n                throw new ArgumentNullException(nameof(source1));\n            }\n\n            if (source2 == null)\n            {\n                throw new ArgumentNullException(nameof(source2));\n            }\n\n            if (source3 == null)\n            {\n                throw new ArgumentNullException(nameof(source3));\n            }\n\n            if (source4 == null)\n            {\n                throw new ArgumentNullException(nameof(source4));\n            }\n\n            if (source5 == null)","sourceCodeStart":952,"sourceCodeEnd":988,"githubUrl":"https://github.com/dotnet/reactive/blob/94b5d5ab912789f5abe9a72138a25bbd716fe59c/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.cs#L952-L988","documentation":"The 15-source Zip overload throws ArgumentNullException when the first source observable is null. The public Zip method validates every source sequence synchronously before building the pipeline, because Zip cannot subscribe to a null sequence.","triggerScenarios":"Calling Observable.Zip(source1, source2, ..., source15, resultSelector) with source1 == null; commonly the result of a query, factory method, or conditional expression that produced null instead of an empty sequence.","commonSituations":"A repository or service method returning null instead of Observable.Empty; uninitialized fields of type IObservable<T>; conditional chains like cond ? obs : null.","solutions":["Pass a non-null IObservable<TSource1>; use Observable.Empty<TSource1>() when there is genuinely no data","Fix the upstream producer to return Observable.Empty (or Observable.Throw) instead of null","Add a null check/coalescing at the call site: source1 ?? Observable.Empty<TSource1>()"],"exampleFix":"// before\nvar zipped = Observable.Zip(GetSource1(), s2 /* ... */, selector); // GetSource1() returned null\n// after\nvar src1 = GetSource1() ?? Observable.Empty<TSource1>();\nvar zipped = Observable.Zip(src1, s2 /* ... */, selector);","handlingStrategy":"validation","validationCode":"if (source1 is null) throw new ArgumentNullException(nameof(source1));","typeGuard":"bool IsUsableSource<T>(IObservable<T>? s) => s is not null;","tryCatchPattern":"try\n{\n    var zipped = Observable.Zip(source1, ..., source15, selector);\n}\ncatch (ArgumentNullException ex) when (ex.ParamName == \"source1\")\n{\n    // substitute Observable.Empty<TSource1>() and retry composition\n}","preventionTips":["Return Observable.Empty<T>() instead of null from producers of observables","Null-coalesce optional streams at composition time with ?? Observable.Empty<T>()","Enable nullable reference types to surface nullable IObservable fields at compile time"],"tags":["null-argument","rx","validation"],"backgroundTag":"null-argument","analyzedSha":"94b5d5ab912789f5abe9a72138a25bbd716fe59c","analyzedAt":"2026-09-15T02:26:24.759Z","contentChangedAt":"2026-09-15T02:26:24.759Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}