-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React: Rxjs/Redux-Observable IE exception thrown but not caught #3949
Comments
Hi @sandy0201, you might want to try the latest version of Rx, or if you can't get to 6, try the latest version of 5.5. There were some fixes to the cc @jayphelps |
Hi @sandy0201, are you sure that you get JSON in case of 401? If not, it may be related to this issue: #3138 |
It seems like I have the same problem (but even without redux-observable). I can reproduce the error like this of("This is not the greatest song in the world").pipe(mergeMap(q =>
ajax({
url: `http://localhost:7643/login`,
method: "POST",
body: "This is just a tribute"
}).pipe(
tap(e => console.log(e)),
catchError(err => of(err))
))
).subscribe(m => console.log(m), e => console.log(e)) On Firefox I get "ajax error" while on Edge and Chrome I get "You provided an invalid object where a stream was expected..." |
It seems like that in the class |
I have to back down from this. I had |
Thanks to @Agraphie I could dig into our code and confirm that I have made a question on stack overflow where I detail my findings. Maybe those can help finding a solution? |
Ok, I'm back with an update. In my case, the error wasn't with RxJs after all (surprise! ...not). My error was the way I registered epics with redux-observable. The project I'm working on needs to lazy load some modules and their epics. The way I do that somehow messes with the observables... I have tried to follow this guide, but I have likely screwed up somewhere... I'll return when I have figured out the correct way to do it. |
Closing this as whether or not the OP's issue was resolved after this is not clear and subsequent comments don't appear to relate to the raise issue. |
Hi,
I have some code for an epic. When I get a 401 error, it is supposed to call a callback function and return an Observable stream which will pop up an error modal. This works in all browsers, except for IE (Internet Explorer).
This is the error I get:
[https://i.stack.imgur.com/WiIrv.png](error screenshot)
Versions of relevant dependencies I am using:
Here's the snippet:
What's weird is that IE does not run the catch statement (as commented in code) at all when 401 error occurs, but it does when other errors 400, 500, etc. occur.
How can I debug this?
The text was updated successfully, but these errors were encountered: