fix: make update_user_status idempotent for already-suspended accounts#94
fix: make update_user_status idempotent for already-suspended accounts#94c1-dev-bot[bot] wants to merge 1 commit into
Conversation
Add an idempotency check to updateUserStatus that fetches the current user state before attempting to update. If the user is already in the desired suspended/active state, return success without making an API call. This matches the pattern already used by disableUserActionHandler and enableUserActionHandler. Fixes: CXP-429
|
Claude finished @c1-dev-bot[bot]'s task in 44s —— View job PR Review: make
|
Summary
updateUserStatusaction handler so that attempting to suspend an already-suspended user (or unsuspend an already-active user) returns success instead of making a redundant API calldisableUserActionHandlerandenableUserActionHandlerwhich already have this checkupdate_user_statusaction was the only user-status action missing this idempotency guard, causing failures when the account lifecycle workflow tried to disable an already-suspended Google Workspace accountFixes: CXP-429
Test plan
TestDisableEnableUser_IdempotentAndPayloadtests passupdate_user_statuswithis_suspended=trueon an already-suspended user returns success without errorupdate_user_statuswithis_suspended=falseon an already-active user returns success without errorAutomated PR Notice
This PR was automatically created by c1-dev-bot as a potential implementation.
This code requires: