refactor: 💡 move token call to be inside try-catch (#2123)
This commit is contained in:
1 parent
cb972cfc8a
commit
4d3c993b0f
1 file changed
+4
-4
@@ -125,11 +125,11 @@ export default class ClientDaemonHandler {
|
||||
// If we got a 403, most likely the client daemon was restarted and our token is no longer valid
|
||||
// I'm not sure if we can get a 401 since we always send a token but we'll handle it in the same way
|
||||
if (e.statusCode === 403 || e.statusCode === 401) {
|
||||
await this.ipc.invoke('addTokenToClientDaemon', {
|
||||
tokenId: auth_token_id,
|
||||
token,
|
||||
});
|
||||
try {
|
||||
await this.ipc.invoke('addTokenToClientDaemon', {
|
||||
tokenId: auth_token_id,
|
||||
token,
|
||||
});
|
||||
clientDaemonResults = await this.ipc.invoke(
|
||||
'searchClientDaemon',
|
||||
remainingQuery,
|
||||
|
||||
Reference in new issue
Block a user