perf: Check whether the applet is available.

This commit is contained in:
Eric
2024-08-05 15:39:16 +08:00
committed by Eric_Lee
parent 1957c2983b
commit 805e7d1d5f
2 changed files with 13 additions and 2 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