perf: Check whether the applet is available.

This commit is contained in:
Eric
2024-08-05 15:39:16 +08:00
committed by Bryan
parent c646084c51
commit 81b5f1ce93
2 changed files with 13 additions and 3 deletions

View File

@@ -200,7 +200,7 @@ class ConnectionToken(JMSOrgBaseModel):
host_account = applet.select_host_account(self.user, self.asset)
if not host_account:
raise JMSException({'error': 'No host account available'})
raise JMSException({'error': 'No host account available, please check the applet, host and account'})
host, account, lock_key = bulk_get(host_account, ('host', 'account', 'lock_key'))
gateway = host.domain.select_gateway() if host.domain else None