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

fastify-session will throw error if post a request without param #4

Closed
woxixiulayin opened this issue Nov 8, 2017 · 3 comments
Closed

Comments

@woxixiulayin
Copy link

hi there,
in my project, it will throw an error if fire a post request without param, it will throw error like this:

        const session = request.session;
                                ^
TypeError: Cannot read property 'session' of undefined
can you fix it? thank you.
@SerayaEryn
Copy link
Owner

I'll take a look at it.

@SerayaEryn
Copy link
Owner

This seems to be a problem in fastify itself. I opened an issue in the fastify repository.

For the meantime I wrote a workaround to avoid this error happening and published it. Please be aware that I can not write the session cookie in this case if the request is undefined.

@SerayaEryn
Copy link
Owner

Fixed in v.0.1.1

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

No branches or pull requests

2 participants