supertokens / supertokens-golang

GoLang SDK for SuperTokens
https://supertokens.com
Other
115 stars 34 forks source link

fix: the with-labstack-echo example #411

Closed furkansenharputlu closed 4 months ago

furkansenharputlu commented 4 months ago

Summary of change

The issue is related to the usage of echo middleware in the with-labstack-echo example. Returning the hf(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 returns nil. When we return as return hf(c), the result of hf(c) will be respected.

Related issues

https://discord.com/channels/603466164219281420/1227846962477535232

Test Plan

Added a test.

Checklist for important updates