Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BED-5065: Display better error messages when creating a new user #1001

Merged
merged 12 commits into from
Dec 12, 2024
Merged

Conversation

wes-mil
Copy link
Contributor

@wes-mil wes-mil commented Dec 6, 2024

Description

Display more descriptive and better formatted errors when failing to create a new user.

Motivation and Context

This PR addresses: BED-5065

Why is this change required? What problem does it solve?

Previous error message would not indicate to the admin user why creating a new user was failing to be created.

How Has This Been Tested?

Creating a new user with a duplicate principal name now displays a more descriptive error message.

Screenshots (optional):

Duplicate principal name errors now display as:
Screenshot from 2024-12-09 14-54-15

Generic errors now display as:
Screenshot from 2024-12-09 14-54-48

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • I have met the contributing prerequisites
  • I have ensured that related documentation is up-to-date
    • Open API docs
    • Code comments (GoDocs / JSDocs)
  • I have followed proper test practices
    • Added/updated tests to cover my changes
    • All new and existing tests passed

@wes-mil wes-mil changed the title BED_5065 BED-5065: Display better error messages when creating a new user Dec 6, 2024
@wes-mil wes-mil added enhancement New feature or request user interface A pull request containing changes affecting the UI code. labels Dec 6, 2024
Copy link
Contributor

@mistahj67 mistahj67 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, please have someone test this locally to verify UI changes

cmd/api/src/database/db.go Outdated Show resolved Hide resolved
@wes-mil wes-mil added the api A pull request containing changes affecting the API code. label Dec 12, 2024
Copy link
Contributor

@ALCooper12 ALCooper12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM and the UI displays the error message properly 👍🏾

@wes-mil wes-mil merged commit 21ec93c into main Dec 12, 2024
4 checks passed
@wes-mil wes-mil deleted the BED-5065 branch December 12, 2024 21:47
@github-actions github-actions bot locked and limited conversation to collaborators Dec 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api A pull request containing changes affecting the API code. enhancement New feature or request user interface A pull request containing changes affecting the UI code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants