Skip to content
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

RTK errors are swallowed (no log, no report) #4489

Closed
Tracked by #4526
fregante opened this issue Oct 18, 2022 · 5 comments · Fixed by #4623
Closed
Tracked by #4526

RTK errors are swallowed (no log, no report) #4489

fregante opened this issue Oct 18, 2022 · 5 comments · Fixed by #4623
Assignees
Labels
bug Something isn't working developer experience

Comments

@fregante
Copy link
Collaborator

fregante commented Oct 18, 2022

Repro:

  1. Add throw new Error('TEST') to after the UUID line

    const connectToContentScript = createAsyncThunk<
    FrameConnectionState,
    void,
    { state: TabStateRootState }
    >("tabState/connectToContentScript", async (arg, thunkAPI) => {
    const uuid = uuidv4();

  2. Open the console or background console

The error is never reported, it doesn't bubble up to the global handler nor there's any RTK-specific handler to catch it. It's completely hidden from the developer.

In this case it appears in the UI, but I suppose it might as well not:

Screen Shot

Related

@fregante fregante changed the title RTK errors are not being automatically reported RTK errors are swallowed (no display, no report) Oct 18, 2022
@fregante fregante changed the title RTK errors are swallowed (no display, no report) RTK errors are swallowed (no log, no report) Oct 18, 2022
@twschiller twschiller added this to the 2022 - Week 44 milestone Oct 28, 2022
@twschiller twschiller added the bug Something isn't working label Oct 28, 2022
@twschiller
Copy link
Contributor

Raising priority of this in case it's the root cause of missing error indicators in other places

@corinnemayans
Copy link
Contributor

Story points: 2

@BLoe
Copy link
Collaborator

BLoe commented Nov 2, 2022

@twschiller What does "missing error indicators in other places" refer to here?

@fregante
Copy link
Collaborator Author

fregante commented Nov 3, 2022

Probably: since errors are swallowed, it's possible that they're not being displayed anywhere even in the UI. The screenshots above do show this "error indicator" but other places might not.

@twschiller
Copy link
Contributor

@twschiller What does "missing error indicators in other places" refer to here?

Correct, I was just flagging that it could cause user error toasts/form validation to not appear in some places. I didn't not investigate particular cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working developer experience
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants