Skip to content

Commit

Permalink
Merge pull request #169 from matrix-org/kegan/403-is-401
Browse files Browse the repository at this point in the history
Treat 403s on /sync as 401s
  • Loading branch information
David Robertson committed Jun 19, 2023
2 parents aa8dad0 + 5f34016 commit 488430a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sync2/poller.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,8 @@ func (p *poller) poll(ctx context.Context, s *pollLoopState) error {
}
if err != nil {
// check if temporary
if statusCode != 401 {
isFatal := statusCode == 401 || statusCode == 403
if !isFatal {
p.logger.Warn().Int("code", statusCode).Err(err).Msg("Poller: sync v2 poll returned temporary error")
s.failCount += 1
return nil
Expand Down

0 comments on commit 488430a

Please sign in to comment.