Skip to content

_observableThrow will stop working in RxJS 8.0 see warning below. #3921

@dolphinsd

Description

@dolphinsd

(alias) _observableThrow(error: any): Observable (+2 overloads)
import _observableThrow
Returns an observable that will error with the specified error immediately upon subscription.

@param error — The error instance to emit

@deprecated
Support for passing an error value will be removed in v8. Instead, pass a factory function to throwError(() => new Error('test')). This is because it will create the error at the moment it should be created and capture a more appropriate stack trace. If for some reason you need to create the error ahead of time, you can still do that: const err = new Error('test'); throwError(() => err);.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions