* Validates the options to connect to a cloud instance. * @private
(options)
| 178 | * @private |
| 179 | */ |
| 180 | function validateCloudOptions(options) { |
| 181 | const bundle = options.cloud.secureConnectBundle; |
| 182 | |
| 183 | // eslint-disable-next-line no-undef |
| 184 | if (!(typeof bundle === 'string' || (typeof URL !== 'undefined' && bundle instanceof URL))) { |
| 185 | throw new TypeError('secureConnectBundle in cloud options must be of type string'); |
| 186 | } |
| 187 | |
| 188 | if (options.contactPoints) { |
| 189 | throw new TypeError('Contact points can not be defined when cloud settings are provided'); |
| 190 | } |
| 191 | |
| 192 | if (options.sslOptions) { |
| 193 | throw new TypeError('SSL options can not be defined when cloud settings are provided'); |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | /** |
| 198 | * Validates the policies from the client options. |