Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Commit

Permalink
fix(connection): log error when no connections found for server
Browse files Browse the repository at this point in the history
  • Loading branch information
ttshivers committed Sep 1, 2020
1 parent 22840b3 commit 9d11e4a
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions src/store/modules/plex/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,19 @@ export default {
} else if (device.provides.indexOf('server') !== -1) {
// This is a Server
// TODO: potentially find connections async and not hold up the fetch devices
const chosenConnection = await dispatch('FIND_WORKING_CONNECTION_PREFERRED', {
connections: device.connections,
accessToken: device.accessToken,
}).catch(() => null);

commit('plexservers/ADD_PLEX_SERVER', {
...device,
chosenConnection,
}, { root: true });
try {
const chosenConnection = await dispatch('FIND_WORKING_CONNECTION_PREFERRED', {
connections: device.connections,
accessToken: device.accessToken,
});

commit('plexservers/ADD_PLEX_SERVER', {
...device,
chosenConnection,
}, { root: true });
} catch (e) {
console.error(`Unable to find working connection to plex server: "${device.name}`, e);
}
}
}));

Expand Down

0 comments on commit 9d11e4a

Please sign in to comment.