Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async getClient(opts: ClientOptions): Promise {
const endpoint = getEndpoint(opts)
const wsdlPath = `seed/${endpoint}.wsdl`.replace('://', '/')
const options = { endpoint, wsdlPath, credentials: opts.credentials }
try {
const client = await getClientInternal(options)
const pureClient = await this.purifyClient(client, endpoint)
return pureClient
} catch (e) {
if (e.code === 'ENOENT') {
throw new SeedError(`Fixture (seed) WSDL is missing: ${wsdlPath}`, e)
}
throw new SoapError(`Unable to create pure mode client: ${e.message}`, e)
}
}