Don't retry on terms error

pull/21833/head
David Baker 2019-07-15 14:05:39 +01:00
parent f13dc82d14
commit 7c43f0bcef
1 changed files with 5 additions and 1 deletions

View File

@ -59,7 +59,11 @@ class ScalarAuthClient {
if (!token) { if (!token) {
return this.registerForToken(); return this.registerForToken();
} else { } else {
return this._checkToken(token).catch(() => { return this._checkToken(token).catch((e) => {
if (e instanceof TermsNotSignedError) {
// retrying won't help this
throw e;
}
return this.registerForToken(); return this.registerForToken();
}); });
} }