As expected, the following code emits 42 after 5 seconds:
const valueObservable = of(42).pipe(delay(5000));
valueObservable.subscribe((value) => console.log(value));
However, this throwing version errors immediately on subscription:
const throwingObservable = throwError(new Error('My Error')).pipe(delay(5000));
throwingObservable.subscribe((value) => console.log(value), (error) => console.error(error));
Why does this happen? How do I delay the throwing of the error?