fix: improve error message when _session_store is missing from context#67
Merged
aldas merged 2 commits intolabstack:masterfrom Dec 17, 2021
GlobalSport:fix/session-error-message
Merged
fix: improve error message when _session_store is missing from context#67aldas merged 2 commits intolabstack:masterfrom GlobalSport:fix/session-error-message
aldas merged 2 commits intolabstack:masterfrom
GlobalSport:fix/session-error-message
Conversation
…text We need to know when _session_store is missing from context and the session middleware is not properly initialized.
Codecov Report
@@ Coverage Diff @@
## master #67 +/- ##
==========================================
+ Coverage 56.76% 57.23% +0.46%
==========================================
Files 8 8
Lines 643 643
==========================================
+ Hits 365 368 +3
+ Misses 256 254 -2
+ Partials 22 21 -1
Continue to review full report at Codecov.
|
aldas
requested changes
Dec 16, 2021
Contributor
aldas
left a comment
There was a problem hiding this comment.
This look OK but please create this as separate test. Having multiple testcases in one test(run) is prone to have sideeffects. Some of our tests are tabled: for example: https://github.com/labstack/echo/blob/7bde9aea068072e08c41148fc230393872d9c49c/middleware/redirect_test.go#L14 but you do not need to have tabled.
Contributor
Author
|
@aldas done ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi there 👋
I was just working with session contrib and found out that the error message when getting the session from echo context does not reflect the real cause.
I've added a test and changed the error message.
Please let me know if I'm wrong or if I need to add a separate test or modify something to comply with code style!