{"record":{"id":"65307eb582582684","repo":"bettercap/bettercap","slug":"input-null-typeof-input-input-is-not","errorCode":null,"errorMessage":"${input !== null && typeof input || input} is not observable","messagePattern":"(.+?) is not observable","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"modules/ui/ui/vendor.js","lineNumber":97921,"sourceCode":"            return input;\n        }\n        return new _Observable__WEBPACK_IMPORTED_MODULE_0__[\"Observable\"](Object(_util_subscribeTo__WEBPACK_IMPORTED_MODULE_9__[\"subscribeTo\"])(input));\n    }\n    if (input != null) {\n        if (Object(_util_isInteropObservable__WEBPACK_IMPORTED_MODULE_3__[\"isInteropObservable\"])(input)) {\n            return Object(_fromObservable__WEBPACK_IMPORTED_MODULE_8__[\"fromObservable\"])(input, scheduler);\n        }\n        else if (Object(_util_isPromise__WEBPACK_IMPORTED_MODULE_1__[\"isPromise\"])(input)) {\n            return Object(_fromPromise__WEBPACK_IMPORTED_MODULE_6__[\"fromPromise\"])(input, scheduler);\n        }\n        else if (Object(_util_isArrayLike__WEBPACK_IMPORTED_MODULE_2__[\"isArrayLike\"])(input)) {\n            return Object(_fromArray__WEBPACK_IMPORTED_MODULE_5__[\"fromArray\"])(input, scheduler);\n        }\n        else if (Object(_util_isIterable__WEBPACK_IMPORTED_MODULE_4__[\"isIterable\"])(input) || typeof input === 'string') {\n            return Object(_fromIterable__WEBPACK_IMPORTED_MODULE_7__[\"fromIterable\"])(input, scheduler);\n        }\n    }\n    throw new TypeError((input !== null && typeof input || input) + ' is not observable');\n}\n//# sourceMappingURL=from.js.map\n\n\n/***/ }),\n\n/***/ \"./node_modules/rxjs/_esm5/internal/observable/fromArray.js\":\n/*!******************************************************************!*\\\n  !*** ./node_modules/rxjs/_esm5/internal/observable/fromArray.js ***!\n  \\******************************************************************/\n/*! exports provided: fromArray */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"fromArray\", function() { return fromArray; });\n/* harmony import */ var _Observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Observable */ \"./node_modules/rxjs/_esm5/internal/Observable.js\");\n/* harmony import */ var _Subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Subscription */ \"./node_modules/rxjs/_esm5/internal/Subscription.js\");","sourceCodeStart":97903,"sourceCodeEnd":97939,"githubUrl":"https://github.com/bettercap/bettercap/blob/8eca2820f3c41d2004434ed5a291d87462caeeb7/modules/ui/ui/vendor.js#L97903-L97939","documentation":"RxJS from() converts Observables, Promises, Arrays, Iterables, and strings into an Observable. If the input matches none of those shapes, from() throws a TypeError stating the input is not observable.","triggerScenarios":"from(123), from({}), from(null) (null reports as 'null is not observable'), passing a non-iterable plain object, or a thenable lacking standard Promise semantics.","commonSituations":"Passing axios/config plain objects thinking they're streams; passing undefined due to an unfulfilled variable; migrating from RxJS 4 where from accepted more input types; forgetting that numbers and plain objects are not convertible.","solutions":["Check the input type before calling from(); wrap primitives/plain objects explicitly, e.g. from([value]) or of(value)","If wrapping an object that only looks async, ensure it implements Symbol.asyncIterator or is a real Promise","Use defer(() => value) when the value type varies at runtime","Log typeof input and inspect it at the throw site"],"exampleFix":"// before\nfrom(config).subscribe(...);\n// after\nfrom([config]).subscribe(...); // or of(config)","handlingStrategy":"type-guard","validationCode":"function isFromConvertible(v) { return v != null && (typeof v[Symbol.observable] === 'function' || typeof v.then === 'function' || typeof v[Symbol.iterator] === 'function' || typeof v === 'string' || Array.isArray(v)); }","typeGuard":"function isObservableLike(v: any): v is Observable<unknown> { return !!v && typeof v[Symbol.observable] === 'function'; }","tryCatchPattern":"try { from(input).subscribe(next); } catch (e) { if (e instanceof TypeError && e.message.includes('is not observable')) { of(input).subscribe(next); } else throw e; }","preventionTips":["Check input shape before from(); use of() for single plain values","Remember only Observable/Promise/Array/Iterable/string are valid from() inputs","Use TypeScript types (ObservableInput<T>) to catch bad inputs at compile time"],"tags":["rxjs","from","type-error","observable"],"backgroundTag":"input-not-observable","analyzedSha":"8eca2820f3c41d2004434ed5a291d87462caeeb7","analyzedAt":"2026-09-02T12:49:00.712Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T16:17:10.729Z"}