add ingores to tokenUtils

This commit is contained in:
Michael C
2022-10-27 01:19:42 -04:00
parent 95dd36a782
commit 9286f16e7b

View File

@@ -58,12 +58,11 @@ export async function createAndSaveToken(type: TokenType, code?: string): Promis
return licenseKey; return licenseKey;
} }
} catch (e) { break;
} catch (e) /* istanbul ignore next */ {
Logger.error(`token creation: ${e}`); Logger.error(`token creation: ${e}`);
return null; return null;
} }
break;
} }
case TokenType.local: { case TokenType.local: {
const licenseKey = generateToken(); const licenseKey = generateToken();
@@ -74,7 +73,6 @@ export async function createAndSaveToken(type: TokenType, code?: string): Promis
return licenseKey; return licenseKey;
} }
} }
return null; return null;
} }
@@ -102,15 +100,12 @@ export async function refreshToken(type: TokenType, licenseKey: string, refreshT
return true; return true;
} }
} catch (e) { } catch (e) /* istanbul ignore next */ {
Logger.error(`token refresh: ${e}`); Logger.error(`token refresh: ${e}`);
return false; return false;
} }
break;
} }
} }
return false; return false;
} }
@@ -136,9 +131,8 @@ export async function getPatreonIdentity(accessToken: string): Promise<PatreonId
if (identityRequest.status === 200) { if (identityRequest.status === 200) {
return identityRequest.data; return identityRequest.data;
} }
} catch (e) { } catch (e) /* istanbul ignore next */ {
Logger.error(`identity request: ${e}`); Logger.error(`identity request: ${e}`);
} }
return null; return null;
} }