fix: the with-labstack-echo example #411
Merged
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.
Summary of change
The issue is related to the usage of echo middleware in the
with-labstack-echo
example. Returning thehf(c)
call will fix it.Why does it fix the issue?
Because the error returned from the handler function is ignored when you don't return its result in the middleware chain. In the example, it ignores what
hf(c)
returns, instead returnsnil
. When we return asreturn hf(c)
, the result ofhf(c)
will be respected.Related issues
https://discord.com/channels/603466164219281420/1227846962477535232
Test Plan
Added a test.
Checklist for important updates
coreDriverInterfaceSupported.json
file has been updated (if needed)supertokens/constants.go
frontendDriverInterfaceSupported.json
file has been updated (if needed)supertokens/constants.go > version variable
recipe/thirdparty/providers/config_utils.go
file,createProvider
function.git tag
) in the formatvX.Y.Z
, and then find the latest branch (git branch --all
) whoseX.Y
is greater than the latest released tag.session/accessTokenVersions_test.go
to account for any new claims that are optional or omitted by the core