diff --git a/CHANGELOG.md b/CHANGELOG.md index 55d2cf53..107d33c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [unreleased] +## [0.24.1] - 2024-09-07 + +- Improves debug logs for error handlers. + ## [0.24.0] - 2024-07-29 ### Changes diff --git a/supertokens/constants.go b/supertokens/constants.go index 6464b10b..ead78783 100644 --- a/supertokens/constants.go +++ b/supertokens/constants.go @@ -21,7 +21,7 @@ const ( ) // VERSION current version of the lib -const VERSION = "0.24.0" +const VERSION = "0.24.1" var ( cdiSupported = []string{"3.1"} diff --git a/supertokens/supertokens.go b/supertokens/supertokens.go index 7df1b4ff..30caf20f 100644 --- a/supertokens/supertokens.go +++ b/supertokens/supertokens.go @@ -335,13 +335,15 @@ func (s *superTokens) errorHandler(originalError error, req *http.Request, res h } for _, recipe := range s.RecipeModules { LogDebugMessage("errorHandler: Checking recipe for match: " + recipe.recipeID) + LogDebugMessage("errorHandler: error: " + originalError.Error()) if recipe.HandleError != nil { - LogDebugMessage("errorHandler: Matched with recipeId: " + recipe.recipeID) handled, err := recipe.HandleError(originalError, req, res, userContext) if err != nil { + LogDebugMessage("errorHandler: error from error handler " + err.Error()) return err } if handled { + LogDebugMessage("errorHandler: Matched with recipeId: " + recipe.recipeID) return nil } }