Skip to content

[Bounty Proposal] fix(action-items): accept_shared_action_items returns misleading 402 Payment Required for deleted tasks instead of 404 #17829

Closed

Description

@Zyphawk

Describe the Bug

In backend/routers/action_items.py, the endpoint POST /v1/action-items/accept (accept_shared_action_items) incorrectly returns 402 Payment Required with the message "All shared tasks are locked. A paid plan is required." when the shared tasks were deleted by the sender or no longer exist.

The current check in lines 1070-1078 does not distinguish between missing/deleted tasks (item is None) and locked tasks (is_locked=True). If all shared tasks have been deleted by the sender, eligible_ids remains empty and triggers a false 402 Paywall error on the client side instead of a clean 404.

Additionally:

  1. If an unhandled failure occurs during the creation loop, the token in Redis is not rolled back, permanently locking out the user (409 Already accepted).
  2. Accepted tasks omit notifying the proactive chat intelligence via _wake_task_changes.

Steps to Reproduce

  1. User A shares tasks via POST /v1/action-items/share.
  2. User A deletes the shared tasks.
  3. User B calls POST /v1/action-items/accept.
  4. Response is 402 Payment Required instead of 404 Not Found.

Expected Behavior

  • Return 404 Not Found ("Shared tasks were deleted or not found") if shared tasks were deleted.
  • Return 402 Payment Required only if tasks exist but are locked.
  • Roll back token acceptance if creation fails before creating tasks.
  • Notify proactive chat assistant via _wake_task_changes.

Bounty Suggestion

@josancamon19 @kodjima33 Could you please attach a $100 bounty to this issue? I have already prepared the complete fix along with unit test coverage and will open the PR right away.

Activity

  1. moved this from Someday to In progress in omi TODO / bountieson Sep 23, 2026
  2. changed the title [-]fix(action-items): accept_shared_action_items returns misleading 402 Payment Required for deleted tasks instead of 404[/-] [+][Bounty Proposal] fix(action-items): accept_shared_action_items returns misleading 402 Payment Required for deleted tasks instead of 404[/+] on Sep 23, 2026
  3. moved this from In progress to In review in omi TODO / bountieson Sep 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

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions