fix(xo-web/select-objects#SelectRemote): gracefully ignore remotes with invalid URL (#3178)
This commit is contained in:
parent
16a6902bd2
commit
fa3eb1cdf5
@ -6,6 +6,8 @@
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- [Remote select] Gracefully ignore remotes with invalid URL (PR [#3178](https://github.com/vatesfr/xen-orchestra/pull/3178))
|
||||
|
||||
### Released packages
|
||||
|
||||
- xo-server v5.23.0
|
||||
|
@ -706,9 +706,13 @@ export const SelectRemote = makeSubscriptionSelect(
|
||||
const unsubscribeRemotes = subscribeRemotes(remotes => {
|
||||
const xoObjects = groupBy(
|
||||
map(sortBy(remotes, 'name'), remote => {
|
||||
remote = { ...remote, ...parseRemote(remote.url) }
|
||||
return { id: remote.id, type: 'remote', value: remote }
|
||||
}),
|
||||
try {
|
||||
remote = { ...remote, ...parseRemote(remote.url) }
|
||||
return { id: remote.id, type: 'remote', value: remote }
|
||||
} catch (err) {
|
||||
console.error('Remote parsing error:', remote, '\n', err)
|
||||
}
|
||||
}).filter(r => r !== undefined),
|
||||
remote => remote.value.type
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user