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

Vague error message when getting an exception during order placement #19083

Closed
korostii opened this issue Nov 6, 2018 · 5 comments
Closed

Vague error message when getting an exception during order placement #19083

korostii opened this issue Nov 6, 2018 · 5 comments
Labels
Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed

Comments

@korostii
Copy link
Contributor

korostii commented Nov 6, 2018

When placeOrder() happens to produce any kind of exception, Magento\Authorizenet\Controller\Directpost\Payment::placeCheckoutOrder() catches it, does not log the error messages and shows a completely different uninformative message to the customer instead.

As you can see by viewing #6929 , there's quite a multitude of reasons leading to this particular error message.
Issue #6929 is marked as "fixed in MAGETWO-63651, MAGETWO-67290, MAGETWO-63650, MAGETWO-63637 and delivered". However, searching for of those MAGETWO tags in this repository shows zero commits and.
Thus, it's not clear whether error reporting was actually fixed in scope of those tasks (most likely, only some of the cases producing an exception for this code to catch) nor which version and/or commits happen to contain those fixes, if any.

Preconditions (*)

  1. Magento version: 2.1.15, 2.2.6
  2. Placing an order with Authorize.net produces an exception for whatever reason

Steps to reproduce (*)

  1. Observe the following files:
    https://github.com/magento/magento2/blob/2.1.15/app/code/Magento/Authorizenet/Controller/Directpost/Payment/Place.php#L132
    https://github.com/magento/magento2/blob/2.2.6/app/code/Magento/Authorizenet/Controller/Directpost/Payment/Place.php#L132

Expected result (*)

  1. Magento should show a more specific and informative message to the user
  2. Magento should place the error message from the catched \Exception (along with its stack trace) into on of the Magento's logs.

Actual result (*)

  1. A vague "An error occurred on the server. Please try to place the order again." message is shown
  2. No errors logged to system.log, debug.log, exception.log etc
@magento-engcom-team
Copy link
Contributor

Hi @korostii. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me $VERSION instance

where $VERSION is version tags (starting from 2.2.0+) or develop branches (for example: 2.3-develop).
For more details, please, review the Magento Contributor Assistant documentation.

@korostii do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Nov 6, 2018
@ghost ghost self-assigned this Nov 6, 2018
@magento-engcom-team
Copy link
Contributor

Hi @engcom-backlog-nazar. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 6. Add label Issue: Confirmed once verification is complete.

  • 7. Make sure that automatic system confirms that report has been added to the backlog.

@ghost
Copy link

ghost commented Nov 6, 2018

Hi @korostii thank you for you report, this is acknowladged issue, please look this -> #18752

@ghost ghost closed this as completed Nov 6, 2018
@korostii
Copy link
Contributor Author

korostii commented Nov 6, 2018

Hi @engcom-backlog-nazar
Thanks for info, but while the error message in #18752 is the same, it is being produced by completely different code: https://github.com/magento/magento2/blob/2.2.6/app/code/Magento/Checkout/Model/GuestPaymentInformationManagement.php#L115

Ideally, I'd love to see both of these fixed.
Could maybe at lease add a reference to https://github.com/magento/magento2/blob/2.2.6/app/code/Magento/Authorizenet/Controller/Directpost/Payment/Place.php#L132 into the corresponding MAGETWO task as well?

Thank in advance & have a nice day!

@ghost
Copy link

ghost commented Nov 6, 2018

@korostii ok you are right this may be fixed in all places, so i add this information to another ticket.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed
Projects
None yet
Development

No branches or pull requests

2 participants