You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bounty Proposal] fix(action-items): accept_shared_action_items returns misleading 402 Payment Required for deleted tasks instead of 404 #17829
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:
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).
Accepted tasks omit notifying the proactive chat intelligence via _wake_task_changes.
Steps to Reproduce
User A shares tasks via POST /v1/action-items/share.
User A deletes the shared tasks.
User B calls POST /v1/action-items/accept.
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
[-]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[/+]