1
0
mirror of https://github.com/mxpv/podsync.git synced 2024-05-11 05:55:04 +00:00

Return error if broken session

This commit is contained in:
Maksym Pavlenko
2017-10-23 19:14:32 -07:00
parent e398a4f729
commit 7afa78bc78

View File

@ -14,6 +14,7 @@ import (
itunes "github.com/mxpv/podcast"
"github.com/mxpv/podsync/pkg/api"
"github.com/mxpv/podsync/pkg/config"
"github.com/pkg/errors"
"golang.org/x/oauth2"
)
@ -198,6 +199,9 @@ Host: www.podsync.net`)
if err := json.Unmarshal([]byte(buf), identity); err != nil {
s.Clear()
s.Save()
c.JSON(internalError(errors.New("broken session, try to login again")))
return
}
}