-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DX] [Session] Improve error message when session write fails #20807
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
Labels
DX
DX = Developer eXperience (anything that improves the experience of using Symfony)
HttpFoundation
Comments
@digilist Would you mind creating a pull request? |
Sure, I'll look into it in a few days. |
@digilist any news? :) |
Yes, sorry. I just opend PR #21421. |
fabpot
pushed a commit
that referenced
this issue
Mar 5, 2017
fabpot
added a commit
that referenced
this issue
Mar 5, 2017
… (digilist) This PR was submitted for the 2.8 branch but it was merged into the 3.3-dev branch instead (closes #21421). Discussion ---------- Use proper error message when session write fails #20807 This improves the error message that is thrown if a session write fails (see #20807) As there was no way to get the actual handler, I introduced a method on the SessionHandlerProxy. I hope that's okay, otherwise please give me a hint on what to do. | Q | A | ------------- | --- | Branch? | 2.8 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #20807 | License | MIT Commits ------- c7a44be Use proper error message when session write fails #20807
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
DX
DX = Developer eXperience (anything that improves the experience of using Symfony)
HttpFoundation
I got the following error message with Symfony, because a session write failed:
It took me some to figure out the cause for this. It has nothing to do with the save_path, but this was the first thing I looked into, when trying to solve the issue. However, the actual reason for this error was a wrongly configured memcached host. So the connection to memcached failed and I didn't remember that I had configured memcached sessions at that moment.
I propose to catch the error message and extend it with some useful information (here).
It looks like there is currently no way to get the name of the current save handler, as it is wrapped into a proxy. So we would have to introduce a way to get the current class name (or anything else) to name the current save handler.
If you think this is useful, I'd like to submit a PR.
There is also issue #17845 where many other users had this error and did not find a solution. I don't know, if there was any case in which it had a similar cause, but I think a better error message might help in similar situation.
The text was updated successfully, but these errors were encountered: