Skip to content

Bug: Settings sagas silently drop errors on failure #71585

In review
notsoravii/freeCodeCamp
#11

Description

@mariamanbar

Describe the Issue

When an API request fails on the /settings page (e.g., updating socials, portfolio, or keyboard shortcuts while offline), the UI silently drops the error. No flash message appears, and the Redux state remains out of sync with the server.

This happens because 11 of the catch blocks in client/src/redux/settings/settings-sagas.js yield the action creator function directly instead of invoking it with the error object.

For example:

} catch {
  yield put(updateMySocialsError);
}

Because updateMySocialsError is passed as a bare function reference, redux-saga ignores it, and no error action is ever dispatched to the Redux store.

Historical Context:

This bug was accidentally cemented in commit 5ef9868 ("refactor: remove unused vars #59658"). A linter/refactoring pass saw catch (e) where e was unreferenced, and stripped the (e) parameter to appease the linter.

Affected Files

client/src/redux/settings/settings-sagas.js

Proposed Fix

Update the 11 affected catch blocks to capture and pass the error object:

} catch (e) {
  yield put(xxxError(e));
}

Export the individual saga functions in settings-sagas.js.

Add a unit test suite using redux-saga-test-plan in a new settings-sagas.test.js file to assert that the put effect correctly yields the invoked error action upon a thrown exception.

Activity

  1. MuhammadAhmad67889 commented on Nov 5, 2026

    @MuhammadAhmad67889
    Contributor

    I'd like to work on this. My plan: update the 11 catch blocks in client/src/redux/settings/settings-sagas.js to capture and pass the error object (yield put(xxxError(e))), export the individual saga functions, and add a settings-sagas.test.js suite using redux-saga-test-plan asserting the error action is yielded when an exception is thrown. Please assign the issue to me if that works.

  2. added
    platform: learn
    status: waiting triage
    on Nov 6, 2026
  3. added
    help wanted
    and removed
    status: waiting triage
    on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedplatform: learn

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions