Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions frontend/src/pages/device/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -518,13 +518,24 @@ export default {
} catch (err) {
this.$refs.dialog.close()
this.openingTunnel = false

const enhancedError = new Error(`Failed to enable device editor tunnel: ${err.message}`)
enhancedError.originalError = err
enhancedError.deviceId = this.device?.id
enhancedError.deviceStatus = this.device?.status
enhancedError.context = 'openTunnel'

throw enhancedError
}
}
} else {
Alerts.emit('Unable to establish a connection to the device. Please check it is connected and running then try again', 'warning', 7500)
}
} catch (err) {
console.warn('Error in openTunnel', err)
if (Object.hasOwnProperty.call(err, 'context') && err.context === 'openTunnel') {
throw err
}
}
},
async closeTunnel () {
Expand Down
Loading