Skip to content

Commit 9286f16

Browse files
committed
add ingores to tokenUtils
1 parent 95dd36a commit 9286f16

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/utils/tokenUtils.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,11 @@ export async function createAndSaveToken(type: TokenType, code?: string): Promis
5858

5959
return licenseKey;
6060
}
61-
} catch (e) {
61+
break;
62+
} catch (e) /* istanbul ignore next */ {
6263
Logger.error(`token creation: ${e}`);
6364
return null;
6465
}
65-
66-
break;
6766
}
6867
case TokenType.local: {
6968
const licenseKey = generateToken();
@@ -74,7 +73,6 @@ export async function createAndSaveToken(type: TokenType, code?: string): Promis
7473
return licenseKey;
7574
}
7675
}
77-
7876
return null;
7977
}
8078

@@ -102,15 +100,12 @@ export async function refreshToken(type: TokenType, licenseKey: string, refreshT
102100

103101
return true;
104102
}
105-
} catch (e) {
103+
} catch (e) /* istanbul ignore next */ {
106104
Logger.error(`token refresh: ${e}`);
107105
return false;
108106
}
109-
110-
break;
111107
}
112108
}
113-
114109
return false;
115110
}
116111

@@ -136,9 +131,8 @@ export async function getPatreonIdentity(accessToken: string): Promise<PatreonId
136131
if (identityRequest.status === 200) {
137132
return identityRequest.data;
138133
}
139-
} catch (e) {
134+
} catch (e) /* istanbul ignore next */ {
140135
Logger.error(`identity request: ${e}`);
141136
}
142-
143137
return null;
144138
}

0 commit comments

Comments
 (0)