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

Show error messages from backend on API failure #524

Merged
merged 12 commits into from
Apr 12, 2023

Conversation

nandhinibsn
Copy link
Contributor

@nandhinibsn nandhinibsn commented Mar 30, 2023

Resolve #

Description:

Checklist:

You should check all boxes before the PR is ready. If a box does not apply, check it to acknowledge it.

  • ISSUE NUMBER. You linked the issue number (Ex: Resolve #XXX).
  • PRE-COMMIT. You ran pre-commit on all commits, or else, you
    ran pre-commit run --all-files at the end.
  • USER CHANGES. The changes are added to CHANGELOG.md and the documentation, if they impact
    our users.
  • DEV CHANGES.
    • Update the documentation if this PR changes how to develop/launch on the app.
    • Update the README files and our wiki for any big design decisions, if relevant.
    • Add unit tests, docstrings, typing and comments for complex sections.

Copy link
Collaborator

@christyler3030 christyler3030 left a comment

Choose a reason for hiding this comment

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

I think this makes sense although I am still unsure of the design for this. The toasts generated by this are not easy to read.

Also we need to decide what to do with the general messages such as the one found here:
https://github.com/ServiceNow/azimuth/pull/524/files#diff-eab2d4424b736fc0a65af85697bd0abf297013425f52e684f71463ddcf22e16dL60

@nandhinibsn nandhinibsn force-pushed the nandhini-display-back-end-error-messages branch from b13a570 to 3fdf3a0 Compare April 11, 2023 05:26
@JosephMarinier JosephMarinier force-pushed the nandhini-display-back-end-error-messages branch from 591532d to c3aa758 Compare April 11, 2023 18:44
@nandhinibsn nandhinibsn force-pushed the nandhini-display-back-end-error-messages branch from 06c6bc2 to 672873f Compare April 12, 2023 00:32
@@ -139,7 +139,7 @@ describe("PerturbationTestingPreview with Failure response", () => {
// expected error message
expect(
screen.getByText(
"Something went wrong fetching behavioral testing summary"
/Something went wrong fetching behavioral testing summary/i
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason for making the regexps case insensitive (i)? If not, I suggest removing it

Suggested change
/Something went wrong fetching behavioral testing summary/i
/Something went wrong fetching behavioral testing summary/

Copy link
Contributor

Choose a reason for hiding this comment

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

Done in 357d66b

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, tests were failing so I added regex but i is not required here. Thank you for removing it.

Copy link
Contributor

@JosephMarinier JosephMarinier left a comment

Choose a reason for hiding this comment

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

Super! 👍

@JosephMarinier JosephMarinier merged commit 32c58cd into main Apr 12, 2023
@JosephMarinier JosephMarinier deleted the nandhini-display-back-end-error-messages branch April 12, 2023 15:20
@JosephMarinier JosephMarinier mentioned this pull request Apr 20, 2023
4 tasks
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.

3 participants