-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Added required error message. #19870
Conversation
If any JSON error occurs user will be be shown error message if the app mode is not in Production.
Hi @vinogcs. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
Hi @vinogcs thanks for your contribution! In my opinion the error message should be the same for production and dev environments. For production/frontend such errors should be properly handled on the higher layer catching that exception and adding a message that is understandable for user (as I think both error message and added description are not user-friendly). |
Hi @sivaschenko, I agree to your point that it has to be taken care by developers at their end and the error message I've added are not clearly understandable. But many non-technical people are adopting Magento for their E-Commerce and non E-Commerce application today. There are few places where these are directly shown to end users who don't have any idea what the error is. Yesterday, one of my MIS team tried to import products from CSV, they got this error and had no idea what the actual problem was and internet and stack overflow failed when they searched with the error message "Unable to serialize value". So I thought it could be better to have little more description on error. The error I've added will tell that the problem was with input file, if it is(in my case it was malformed UTF characters). And I think it will also help developers to include better response to their exception management without worrying about validating input file separately. Maybe I'm wrong, it's just my 2 cents.. :) |
@vinogcs thanks for details. I completely agree with your point of view! I meant that I don't think If you don't think it's appropriate to output all the details on production environments I'd suggest to dump the details to the log. Please let me know what do you think about it. |
@sivaschenko I think you're right. It would consume more resources to check the state of the app just to show the error message. We can just go for showing error irrespective of the environment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @vinogcs , thanks for your update! Please consider removing of added trailing spaces as per my suggestio
Co-Authored-By: vinogcs <vinogcs@users.noreply.github.com>
Oops!. My Bad. |
Hi @sivaschenko, thank you for the review. |
Hi @vinogcs, thank you for your contribution! |
Hi @vinogcs. Thank you for your contribution. |
If any JSON error occurs user will be be shown error message if the app mode is not in Production.
Description (*)
Added error description in JSON serialization.
Fixed Issues (if relevant)
Manual testing scenarios (*)
Contribution checklist (*)