Better stack trace for the following error #6023
craig-dae
started this conversation in
Ideas / Feature request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I had a bug that I recently squashed, where I had a switch-case in a switchMap, but neither of my two switch conditions happened, so I returned nothing. I recieved an error that began with the following:
ERROR Error: Uncaught (in promise): TypeError: You provided 'undefined' where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.
The stack trace provided nothing useful to find where my mistake was. It burned maybe two hours narrowing it down to the offending observable before figuring out the problem. If a switchMap doesn't return an observable, can you please provide some way of letting the developer know which switchMap created the problem?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions