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

Solve error with no suchentity exception which can occur #103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rofokken
Copy link

Fixes issue when customer is logged in on website en user is deleted. The log wont work anymore and Magento throws error: Could not write error message to log. Please use developer mode to see the message

This catches all exception so normal logging can continue

Summary

Result

Fixes issue when customer is logged in on website en user is deleted. The log wont work anymore and Magento throws error: Could not write error message to log. Please use developer mode to see the message

This catches all exception so normal logging can continue
@indykoning
Copy link
Member

While the normal execution doesn't need to be hindered here i'm not a big fan of ignoring every possible exception that could occur in that code, since this could lead to it being impossible to discover and diagnose bugs in that area of code.

What part of that code throws the NoSuchEntityException and why does it do so?
Are we missing a check somewhere?
I'd think checking if a customer is logged in would be enough to know it's a customer that is available in the database.

If there's a check we could add to prevent this error that would be my preferred solution.
Otherwise i would be content with catching NoSuchEntityException specifically.

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.

2 participants