aboutsummaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2021-10-23 13:41:41 +0000
committerr <r@freesoftwareextremist.com>2021-10-23 13:41:41 +0000
commit7d389d22581cc785005a42d655eb7f9c32aac3ec (patch)
treef705a2ff549429953b46dc31ed12b695385e44c2 /service
parent816281c225e1d07602aa4f6d87d5ffbbc8dfbb7a (diff)
downloadbloat-7d389d22581cc785005a42d655eb7f9c32aac3ec.tar.gz
bloat-7d389d22581cc785005a42d655eb7f9c32aac3ec.zip
Show signin button in case of an auth error
Diffstat (limited to 'service')
-rw-r--r--service/service.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/service/service.go b/service/service.go
index 03f0ff3..244fd81 100644
--- a/service/service.go
+++ b/service/service.go
@@ -114,7 +114,8 @@ func (s *service) ErrorPage(c *client, err error, retry bool) error {
var sessionErr bool
if err != nil {
errStr = err.Error()
- if err == errInvalidSession || err == errInvalidCSRFToken {
+ if me, ok := err.(mastodon.Error); ok && me.IsAuthError() ||
+ err == errInvalidSession || err == errInvalidCSRFToken {
sessionErr = true
}
}