{"record":{"id":"747a9407e6359e74","repo":"ReactiveX/rxjs","slug":"subscriber-error-requires-an-error","errorCode":null,"errorMessage":"Subscriber.error requires an error","messagePattern":"Subscriber\\.error requires an error","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/observable-polyfill/src/index.ts","lineNumber":223,"sourceCode":"\n  next(value: T): void {\n    this.#assertBrand();\n    if (arguments.length === 0) {\n      throw new TypeError('Subscriber.next requires a value');\n    }\n\n    if (this.active) {\n      const observers = Array.from(this.#observerList);\n      for (const observer of observers) {\n        observer.next(value);\n      }\n    }\n  }\n\n  error(error: any): void {\n    this.#assertBrand();\n    if (arguments.length === 0) {\n      throw new TypeError('Subscriber.error requires an error');\n    }\n\n    this[errorSubscriber](error, true);\n  }\n\n  [errorSubscriber](error: any, hasSourceLocation: boolean): void {\n    if (!this.active) {\n      reportError(error, hasSourceLocation);\n      return;\n    }\n\n    const observers = Array.from(this.#observerList);\n    this[closeSubscriber](error);\n    for (const observer of observers) {\n      observer.error(error, hasSourceLocation);\n    }\n  }\n","sourceCodeStart":205,"sourceCodeEnd":241,"githubUrl":"https://github.com/ReactiveX/rxjs/blob/54796b38a57e6309f9861e174737479bb3f63f61/packages/observable-polyfill/src/index.ts#L205-L241","documentation":"Error \"Subscriber.error requires an error\" thrown in ReactiveX/rxjs.","triggerScenarios":"Thrown at packages/observable-polyfill/src/index.ts:223 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"54796b38a57e6309f9861e174737479bb3f63f61","analyzedAt":"2026-08-28T10:21:27.410Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}