diff --git a/api/app/clients/BaseClient.js b/api/app/clients/BaseClient.js index a57e424889..972716ee08 100644 --- a/api/app/clients/BaseClient.js +++ b/api/app/clients/BaseClient.js @@ -71,7 +71,7 @@ class BaseClient { * @returns {string} */ getResponseModel() { - if (this.options.agent.id && isAgentsEndpoint(this.options.endpoint)) { + if (isAgentsEndpoint(this.options.endpoint) && this.options.agent && this.options.agent.id) { return this.options.agent.id; }