fix: validate UUID in user Enable and Disable RPCs by whoAbhishekSah · Pull Request #1439 · raystack/frontier
The Enable and Disable methods in the user service were passing the user ID directly to the repository without validating it is a valid UUID. This caused invalid IDs to reach PostgreSQL and return confusing "not found" errors instead of proper "invalid ID" errors. Add UUID validation using utils.IsValidUUID() at the start of both methods, consistent with how GetByID and Update already validate. The handlers already map ErrInvalidID to CodeInvalidArgument, so callers now correctly receive a 400 Bad Request for invalid UUIDs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
whoAbhishekSah
changed the title
fix: validate UUID in user Enable and Disable APIs
fix: validate UUID in user Enable and Disable RPCs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters