Skip to content

Fix/user validation error handling#74

Open
hariomtiwari-work wants to merge 2 commits intoparalus:mainfrom
hariomtiwari-work:fix/user-validation-error-handling
Open

Fix/user validation error handling#74
hariomtiwari-work wants to merge 2 commits intoparalus:mainfrom
hariomtiwari-work:fix/user-validation-error-handling

Conversation

@hariomtiwari-work
Copy link

What does this PR change?

Improves validation and error handling for pctl create user.

Changes

  • Added email format validation before API call
  • Improved error handling to surface actual backend error instead of misleading 500

Result

  • Invalid input like pctl create user abc now returns:
    "invalid email format"
  • Backend errors are displayed clearly

Context

While reproducing issue #310, it was observed that:

  • CLI allowed invalid input
  • Backend returned 400 but CLI showed 500

This change improves UX and debugging clarity.

Does the PR depend on any other PRs or Issues? If yes, please list them.

  • Issue #310

Checklist

I confirm, that I have...

  • [ .] Read and followed the contributing guide in CONTRIBUTING.md
  • Added tests for this PR
  • [ .] Formatted the code using go fmt (if applicable)
  • Updated documentation on the Paralus docs site (if applicable)
  • Updated CHANGELOG.md

Signed-off-by: hariomtiwari-work <hariom.tiwari@infracloud.io>
Signed-off-by: hariomtiwari-work <hariom.tiwari@infracloud.io>
@hariomtiwari-work hariomtiwari-work force-pushed the fix/user-validation-error-handling branch from f2a48f5 to d1755de Compare March 18, 2026 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant