Commit bc84be70 authored by Tomas's avatar Tomas
Browse files

Add a Stack method to SessionError to get strack traces out, if any.

parent 41252c34
......@@ -166,6 +166,14 @@ func (e *SessionError) Error() string {
return buffer.String()
}
func (e *SessionError) Stack() string {
if withStack, ok := e.Err.(*errors.Error); ok {
return string(withStack.Stack())
}
return ""
}
func JwtDecode(jwt string, body interface{}) error {
jwtparts := strings.Split(jwt, ".")
if jwtparts == nil || len(jwtparts) < 2 {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment