fix(ux)!: when error messages are present, supress non-error messages #16284
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem: During network request handling we often print several messages to help users... however during the course of handling such requests a single
frappe.throw
usually means full rollback of everything that happened in the request. Hence previous messages make no sense.Summary of change: if there are any messages with
raise_exception
then only show errors.Minimal reproducible example:
This will show up as:
![Screenshot 2022-03-15 at 1 52 48 PM](https://user-images.githubusercontent.com/9079960/158342579-c1b4904a-bc26-4167-b1e8-4ee5429c6063.png)
Another real example when serial no generation fails:
XP vibes.
After this change:
![Screenshot 2022-03-15 at 2 31 26 PM](https://user-images.githubusercontent.com/9079960/158342630-7ae67bcc-ef76-4037-996c-28c0e76f97e3.png)
closes #15674