Error when session not found
enmanuelr opened this issue · 1 comments
enmanuelr commented
http://www.gorillatoolkit.org/pkg/sessions#Registry.Get
If my interpretation of the gorilla docs is correct, when the session is not found, the store should create a new session and return it. An error should not be generated if the session is not found.
https://github.com/antonlindstrom/pgstore/blob/master/pgstore.go#L249
If the query on this line returns sql.ErrNoRows
, it's a good idea to generate a new session and return it.
mfzl commented
I just spent an embarrassing amount of time trying to figure what the issue was. Turns out it was not ignoring the error when no rows were found.
@antonlindstrom please have a look at #24