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

feat: add error messages to error flashes #179

Merged
merged 5 commits into from
Jun 19, 2024
Merged

Conversation

sutterj
Copy link
Contributor

@sutterj sutterj commented Jun 13, 2024

Pull Request

Proposed Changes

Readiness Checklist

Author/Contributor

  • If documentation is needed for this change, has that been included in this pull request
  • run npm run lint and fix any linting issues that have been introduced
  • run npm run test and run tests
  • If publishing new data to the public (scorecards, security scan results, code quality results, live dashboards, etc.), please request review from @jeffrey-luszcz

Reviewer

  • Label as either bug, documentation, enhancement, infrastructure, maintenance, or breaking

@sutterj sutterj added the enhancement New feature or request label Jun 13, 2024
@sutterj sutterj requested a review from a team as a code owner June 13, 2024 20:58
@sutterj
Copy link
Contributor Author

sutterj commented Jun 13, 2024

Currently there is some handling in the create procedure to make a "pretty" message if one already exists:

Image

This is the only error that has this, so is it worthwhile to do this for the other procedures or is that too specific/tedious because of the number of possible errors:

Image

@zkoppert
Copy link
Contributor

Currently there is some handling in the create procedure to make a "pretty" message if one already exists:

Image

This is the only error that has this, so is it worthwhile to do this for the other procedures or is that too specific/tedious because of the number of possible errors:

Image

@ahpook thoughts?

@jmeridth jmeridth requested a review from ahpook June 18, 2024 16:13
Copy link
Contributor

@ajhenry ajhenry left a comment

Choose a reason for hiding this comment

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

looks good from an engineering pov

@ahpook
Copy link
Contributor

ahpook commented Jun 18, 2024

Hmmm. How many potential other messages are we looking at? The json barf is pretty ugly ...

Is the format predictable enough to extract the message field and pretty-print that with a generic "Failed to create mirror. Error was: " banner?

@sutterj
Copy link
Contributor Author

sutterj commented Jun 18, 2024

I'm not really sure how many, but I would guess that the name conflict one is probably the most common and that one is already covered. I would imagine that the API is consistent and returns a message field though and that would be easy to add to the banner by itself.

@sutterj sutterj requested a review from ajhenry June 18, 2024 22:40
@sutterj sutterj merged commit 2c3ef74 into main Jun 19, 2024
12 checks passed
@sutterj sutterj deleted the sutterj/error-messaging branch June 19, 2024 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display specific error message in error flash
4 participants