]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/auth/auth-interceptor.service.ts
Upgrade Angular first step
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / auth / auth-interceptor.service.ts
index 1e890d8f3846cba5003b871d62dda1f8da3c3dae..efcfc452b654d9ac6ebb91f94deb0d32124a82c5 100644 (file)
@@ -28,7 +28,7 @@ export class AuthInterceptor implements HttpInterceptor {
     // Catch 401 errors (refresh token expired)
     return next.handle(authReq)
                .catch(err => {
-                 if (err.status === 401) {
+                 if (err.status === 401 && err.error && err.error.code === 'invalid_token') {
                    return this.handleTokenExpired(req, next)
                  }